diff options
author | Péter Szilágyi <peterke@gmail.com> | 2019-08-23 17:09:27 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2019-08-23 17:09:27 +0800 |
commit | e39b2a2bde3f2f1a82f7836cf957af94a45acfc2 (patch) | |
tree | daa7163f40b60ebee34b4d416933cd12630f2ef4 /core | |
parent | 961aa0533f75027bc5bc80f994adb80d14635553 (diff) | |
download | go-tangerine-e39b2a2bde3f2f1a82f7836cf957af94a45acfc2.tar go-tangerine-e39b2a2bde3f2f1a82f7836cf957af94a45acfc2.tar.gz go-tangerine-e39b2a2bde3f2f1a82f7836cf957af94a45acfc2.tar.bz2 go-tangerine-e39b2a2bde3f2f1a82f7836cf957af94a45acfc2.tar.lz go-tangerine-e39b2a2bde3f2f1a82f7836cf957af94a45acfc2.tar.xz go-tangerine-e39b2a2bde3f2f1a82f7836cf957af94a45acfc2.tar.zst go-tangerine-e39b2a2bde3f2f1a82f7836cf957af94a45acfc2.zip |
acmd, core, eth, les: support --override.istanbul
Diffstat (limited to 'core')
-rw-r--r-- | core/genesis.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/genesis.go b/core/genesis.go index 5d6311b32..8261c18cc 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -152,6 +152,10 @@ func (e *GenesisMismatchError) Error() string { // // The returned chain configuration is never nil. func SetupGenesisBlock(db ethdb.Database, genesis *Genesis) (*params.ChainConfig, common.Hash, error) { + return SetupGenesisBlockWithOverride(db, genesis, nil) +} + +func SetupGenesisBlockWithOverride(db ethdb.Database, genesis *Genesis, overrideIstanbul *big.Int) (*params.ChainConfig, common.Hash, error) { if genesis != nil && genesis.Config == nil { return params.AllEthashProtocolChanges, common.Hash{}, errGenesisNoConfig } @@ -200,6 +204,9 @@ func SetupGenesisBlock(db ethdb.Database, genesis *Genesis) (*params.ChainConfig // Get the existing chain configuration. newcfg := genesis.configOrDefault(stored) + if overrideIstanbul != nil { + newcfg.IstanbulBlock = overrideIstanbul + } storedcfg := rawdb.ReadChainConfig(db, stored) if storedcfg == nil { log.Warn("Found genesis block without chain config") |