From 4dca5d4db7fc2c1fac5a2e24dcc99b15573f0188 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Wed, 2 Nov 2016 13:44:13 +0100 Subject: core/types, params: EIP#155 --- cmd/utils/flags.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd') 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) -- cgit