diff options
author | Péter Szilágyi <peterke@gmail.com> | 2019-02-06 20:34:08 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2019-02-06 20:34:08 +0800 |
commit | 9747df295e7356964d96b45fa9e0d3f93cc27788 (patch) | |
tree | f40462b47a3d660a0fa266c9177fb5580bcbb5ef /cmd/puppeth | |
parent | 75c9570c317d174b0f7278b051fa9a6fef93f8b8 (diff) | |
download | go-tangerine-9747df295e7356964d96b45fa9e0d3f93cc27788.tar go-tangerine-9747df295e7356964d96b45fa9e0d3f93cc27788.tar.gz go-tangerine-9747df295e7356964d96b45fa9e0d3f93cc27788.tar.bz2 go-tangerine-9747df295e7356964d96b45fa9e0d3f93cc27788.tar.lz go-tangerine-9747df295e7356964d96b45fa9e0d3f93cc27788.tar.xz go-tangerine-9747df295e7356964d96b45fa9e0d3f93cc27788.tar.zst go-tangerine-9747df295e7356964d96b45fa9e0d3f93cc27788.zip |
cmd/puppeth: handle pre-set Petersburg number, save changed fork rules
Diffstat (limited to 'cmd/puppeth')
-rw-r--r-- | cmd/puppeth/wizard_genesis.go | 10 |
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() |