cmd/puppeth: skip genesis custom extra-data
This commit is contained in:
parent
6eb38e02a8
commit
7abf968d6f
@ -118,22 +118,11 @@ func (w *wizard) makeGenesis() {
|
|||||||
for i := int64(0); i < 256; i++ {
|
for i := int64(0); i < 256; i++ {
|
||||||
genesis.Alloc[common.BigToAddress(big.NewInt(i))] = core.GenesisAccount{Balance: big.NewInt(1)}
|
genesis.Alloc[common.BigToAddress(big.NewInt(i))] = core.GenesisAccount{Balance: big.NewInt(1)}
|
||||||
}
|
}
|
||||||
fmt.Println()
|
|
||||||
|
|
||||||
// Query the user for some custom extras
|
// Query the user for some custom extras
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
fmt.Println("Specify your chain/network ID if you want an explicit one (default = random)")
|
fmt.Println("Specify your chain/network ID if you want an explicit one (default = random)")
|
||||||
genesis.Config.ChainId = new(big.Int).SetUint64(uint64(w.readDefaultInt(rand.Intn(65536))))
|
genesis.Config.ChainId = new(big.Int).SetUint64(uint64(w.readDefaultInt(rand.Intn(65536))))
|
||||||
|
|
||||||
fmt.Println()
|
|
||||||
fmt.Println("Anything fun to embed into the genesis block? (max 32 bytes)")
|
|
||||||
|
|
||||||
extra := w.read()
|
|
||||||
if len(extra) > 32 {
|
|
||||||
extra = extra[:32]
|
|
||||||
}
|
|
||||||
genesis.ExtraData = append([]byte(extra), genesis.ExtraData[len(extra):]...)
|
|
||||||
|
|
||||||
// All done, store the genesis and flush to disk
|
// All done, store the genesis and flush to disk
|
||||||
w.conf.genesis = genesis
|
w.conf.genesis = genesis
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ func (w *wizard) run() {
|
|||||||
for {
|
for {
|
||||||
w.network = w.readString()
|
w.network = w.readString()
|
||||||
if !strings.Contains(w.network, " ") {
|
if !strings.Contains(w.network, " ") {
|
||||||
fmt.Printf("Sweet, you can set this via --network=%s next time!\n\n", w.network)
|
fmt.Printf("\nSweet, you can set this via --network=%s next time!\n\n", w.network)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
log.Error("I also like to live dangerously, still no spaces")
|
log.Error("I also like to live dangerously, still no spaces")
|
||||||
|
Loading…
Reference in New Issue
Block a user