aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2016-11-02 20:44:13 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2016-11-13 21:55:30 +0800
commit4dca5d4db7fc2c1fac5a2e24dcc99b15573f0188 (patch)
tree5c55a3088c944ddf517aa4d7c85c5dc7f02d00e4 /cmd
parent5cd86443ee071b5e3abe4995c777ce467c29f2c5 (diff)
downloadgo-tangerine-4dca5d4db7fc2c1fac5a2e24dcc99b15573f0188.tar.gz
go-tangerine-4dca5d4db7fc2c1fac5a2e24dcc99b15573f0188.tar.zst
go-tangerine-4dca5d4db7fc2c1fac5a2e24dcc99b15573f0188.zip
core/types, params: EIP#155
Diffstat (limited to 'cmd')
-rw-r--r--cmd/utils/flags.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 641ff6d40..52b78a5c3 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -825,6 +825,10 @@ func MakeChainConfigFromDb(ctx *cli.Context, db ethdb.Database) *params.ChainCon
Fatalf("Could not make chain configuration: %v", err)
}
}
+ // set chain id in case it's zero.
+ if config.ChainId == nil {
+ config.ChainId = new(big.Int)
+ }
// Check whether we are allowed to set default config params or not:
// - If no genesis is set, we're running either mainnet or testnet (private nets use `geth init`)
// - If a genesis is already set, ensure we have a configuration for it (mainnet or testnet)