aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2016-11-15 04:37:13 +0800
committerGitHub <noreply@github.com>2016-11-15 04:37:13 +0800
commita672eae3d12359d79e39733ff80a2acf5728cf9b (patch)
treeb36f242971b506835e2de8908a7fce3ab9913fc3 /cmd
parent8dcea0ac0785c92df84d55b8322281e12189d8fb (diff)
parent7a6c6ec9469722abca93f94c4a3725f026ab09bc (diff)
downloadgo-tangerine-a672eae3d12359d79e39733ff80a2acf5728cf9b.tar
go-tangerine-a672eae3d12359d79e39733ff80a2acf5728cf9b.tar.gz
go-tangerine-a672eae3d12359d79e39733ff80a2acf5728cf9b.tar.bz2
go-tangerine-a672eae3d12359d79e39733ff80a2acf5728cf9b.tar.lz
go-tangerine-a672eae3d12359d79e39733ff80a2acf5728cf9b.tar.xz
go-tangerine-a672eae3d12359d79e39733ff80a2acf5728cf9b.tar.zst
go-tangerine-a672eae3d12359d79e39733ff80a2acf5728cf9b.zip
core, core/types: refactored tx chain id checking (#3257)
* core, core/types: refactored tx chain id checking Refactored explicit chain id checking in to the Sender deriviation method * cmd/utils, params: define chain ids
Diffstat (limited to 'cmd')
-rw-r--r--cmd/utils/flags.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 1ba905657..6d9482e69 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -906,6 +906,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
}