From 68e70ebdcad80acfcf6ed7816964d4188d7575cc Mon Sep 17 00:00:00 2001 From: jangko Date: Wed, 28 Apr 2021 22:08:10 +0700 Subject: [PATCH] fixes hard fork block number initialization in `processCustomGenesisConfig` rather than initialize it to 0, those block numbers are initialized to high(BlockNumber). this will fix issue when imported genesis.json doesn't contains all forks' blockNumber. --- nimbus/config.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nimbus/config.nim b/nimbus/config.nim index 022538e22..1b40e3782 100644 --- a/nimbus/config.nim +++ b/nimbus/config.nim @@ -374,8 +374,8 @@ proc processCustomGenesisConfig(customGenesis: JsonNode): ConfigStatus = result = Success var chainId = 1.ChainId - homesteadBlock, daoForkblock, eip150Block, eip155Block, eip158Block, byzantiumBlock, constantinopleBlock = 0.toBlockNumber - petersburgBlock, istanbulBlock, muirGlacierBlock, berlinBlock = 0.toBlockNumber + homesteadBlock, daoForkblock, eip150Block, eip155Block, eip158Block, byzantiumBlock, constantinopleBlock = high(BlockNumber).toBlockNumber + petersburgBlock, istanbulBlock, muirGlacierBlock, berlinBlock = high(BlockNumber).toBlockNumber eip150Hash, mixHash : MDigest[256] daoForkSupport = false nonce = 66.toBlockNonce