aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2016-11-09 06:01:47 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2016-11-13 22:50:32 +0800
commitae33883c2fd72b960e774833708deb1ce10e3fe4 (patch)
treeae41f2096936f306d5caaca8db9381272cd2b98c /cmd
parent4dca5d4db7fc2c1fac5a2e24dcc99b15573f0188 (diff)
downloadgo-tangerine-ae33883c2fd72b960e774833708deb1ce10e3fe4.tar
go-tangerine-ae33883c2fd72b960e774833708deb1ce10e3fe4.tar.gz
go-tangerine-ae33883c2fd72b960e774833708deb1ce10e3fe4.tar.bz2
go-tangerine-ae33883c2fd72b960e774833708deb1ce10e3fe4.tar.lz
go-tangerine-ae33883c2fd72b960e774833708deb1ce10e3fe4.tar.xz
go-tangerine-ae33883c2fd72b960e774833708deb1ce10e3fe4.tar.zst
go-tangerine-ae33883c2fd72b960e774833708deb1ce10e3fe4.zip
cmd/utils: set temporary HF number
Diffstat (limited to 'cmd')
-rw-r--r--cmd/utils/flags.go41
1 files changed, 28 insertions, 13 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 52b78a5c3..2d6bb4f5b 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -853,22 +853,37 @@ func MakeChainConfigFromDb(ctx *cli.Context, db ethdb.Database) *params.ChainCon
}
config.DAOForkSupport = true
}
- config.DAOForkSupport = true
- }
- if config.EIP150Block == nil {
- if ctx.GlobalBool(TestNetFlag.Name) {
- config.EIP150Block = params.TestNetHomesteadGasRepriceBlock
- } else {
- config.EIP150Block = params.MainNetHomesteadGasRepriceBlock
+ if config.EIP150Block == nil {
+ if ctx.GlobalBool(TestNetFlag.Name) {
+ config.EIP150Block = params.TestNetHomesteadGasRepriceBlock
+ } else {
+ config.EIP150Block = params.MainNetHomesteadGasRepriceBlock
+ }
}
- }
- if config.EIP150Hash == (common.Hash{}) {
- if ctx.GlobalBool(TestNetFlag.Name) {
- config.EIP150Hash = params.TestNetHomesteadGasRepriceHash
- } else {
- config.EIP150Hash = params.MainNetHomesteadGasRepriceHash
+ if config.EIP150Hash == (common.Hash{}) {
+ if ctx.GlobalBool(TestNetFlag.Name) {
+ config.EIP150Hash = params.TestNetHomesteadGasRepriceHash
+ } else {
+ config.EIP150Hash = params.MainNetHomesteadGasRepriceHash
+ }
}
+ if config.EIP155Block == nil {
+ if ctx.GlobalBool(TestNetFlag.Name) {
+ config.EIP150Block = params.TestNetSpuriousDragon
+ } else {
+ config.EIP155Block = params.MainNetSpuriousDragon
+ }
+ }
+ if config.EIP158Block == nil {
+ if ctx.GlobalBool(TestNetFlag.Name) {
+ config.EIP158Block = params.TestNetSpuriousDragon
+ } else {
+ config.EIP158Block = params.MainNetSpuriousDragon
+ }
+ }
+ config.DAOForkSupport = true
}
+
// Force override any existing configs if explicitly requested
switch {
case ctx.GlobalBool(SupportDAOFork.Name):