diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-11-15 00:23:39 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-11-15 00:23:39 +0800 |
commit | 7a6c6ec9469722abca93f94c4a3725f026ab09bc (patch) | |
tree | 2564af662c6bdc3d0fafe08a024f7d38ae0f862f /cmd | |
parent | 6c9c1e6712d684e782a8920dac0173b49257fa1f (diff) | |
download | go-tangerine-7a6c6ec9469722abca93f94c4a3725f026ab09bc.tar go-tangerine-7a6c6ec9469722abca93f94c4a3725f026ab09bc.tar.gz go-tangerine-7a6c6ec9469722abca93f94c4a3725f026ab09bc.tar.bz2 go-tangerine-7a6c6ec9469722abca93f94c4a3725f026ab09bc.tar.lz go-tangerine-7a6c6ec9469722abca93f94c4a3725f026ab09bc.tar.xz go-tangerine-7a6c6ec9469722abca93f94c4a3725f026ab09bc.tar.zst go-tangerine-7a6c6ec9469722abca93f94c4a3725f026ab09bc.zip |
cmd/utils, params: define chain ids
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/utils/flags.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 2d6bb4f5b..f86fc37f5 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -881,6 +881,13 @@ func MakeChainConfigFromDb(ctx *cli.Context, db ethdb.Database) *params.ChainCon config.EIP158Block = params.MainNetSpuriousDragon } } + if config.ChainId.BitLen() == 0 { + if ctx.GlobalBool(TestNetFlag.Name) { + config.ChainId = params.TestNetChainID + } else { + config.ChainId = params.MainNetChainID + } + } config.DAOForkSupport = true } |