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.
This commit is contained in:
jangko 2021-04-28 22:08:10 +07:00
parent 287f1b2ba0
commit 68e70ebdca
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 2 additions and 2 deletions

View File

@ -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