aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2019-02-06 20:34:08 +0800
committerMartin Holst Swende <martin@swende.se>2019-02-10 00:38:00 +0800
commit18f702faf7bcb9c7ca95a082b78aece2a4ed664f (patch)
tree9e07afe089d057007eb389ea192edf5a31a7e481 /cmd
parent3a95128b22a239c8e7b878a40bb36b003ec36267 (diff)
downloadgo-tangerine-18f702faf7bcb9c7ca95a082b78aece2a4ed664f.tar
go-tangerine-18f702faf7bcb9c7ca95a082b78aece2a4ed664f.tar.gz
go-tangerine-18f702faf7bcb9c7ca95a082b78aece2a4ed664f.tar.bz2
go-tangerine-18f702faf7bcb9c7ca95a082b78aece2a4ed664f.tar.lz
go-tangerine-18f702faf7bcb9c7ca95a082b78aece2a4ed664f.tar.xz
go-tangerine-18f702faf7bcb9c7ca95a082b78aece2a4ed664f.tar.zst
go-tangerine-18f702faf7bcb9c7ca95a082b78aece2a4ed664f.zip
cmd/puppeth: handle pre-set Petersburg number, save changed fork rules
Diffstat (limited to 'cmd')
-rw-r--r--cmd/puppeth/wizard_genesis.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/cmd/puppeth/wizard_genesis.go b/cmd/puppeth/wizard_genesis.go
index 8abfe7c41..6aed09f14 100644
--- a/cmd/puppeth/wizard_genesis.go
+++ b/cmd/puppeth/wizard_genesis.go
@@ -222,14 +222,18 @@ func (w *wizard) manageGenesis() {
fmt.Println()
fmt.Printf("Which block should Constantinople come into effect? (default = %v)\n", w.conf.Genesis.Config.ConstantinopleBlock)
w.conf.Genesis.Config.ConstantinopleBlock = w.readDefaultBigInt(w.conf.Genesis.Config.ConstantinopleBlock)
-
+ if w.conf.Genesis.Config.PetersburgBlock == nil {
+ w.conf.Genesis.Config.PetersburgBlock = w.conf.Genesis.Config.ConstantinopleBlock
+ }
fmt.Println()
- fmt.Printf("Which block should Constantinople-Fix (remove EIP-1283) come into effect? (default = %v)\n", w.conf.Genesis.Config.ConstantinopleBlock)
- w.conf.Genesis.Config.PetersburgBlock = w.readDefaultBigInt(w.conf.Genesis.Config.ConstantinopleBlock)
+ fmt.Printf("Which block should Constantinople-Fix (remove EIP-1283) come into effect? (default = %v)\n", w.conf.Genesis.Config.PetersburgBlock)
+ w.conf.Genesis.Config.PetersburgBlock = w.readDefaultBigInt(w.conf.Genesis.Config.PetersburgBlock)
out, _ := json.MarshalIndent(w.conf.Genesis.Config, "", " ")
fmt.Printf("Chain configuration updated:\n\n%s\n", out)
+ w.conf.flush()
+
case "2":
// Save whatever genesis configuration we currently have
fmt.Println()