fixes #548, custom network json parser now behaves like geth

This commit is contained in:
jangko 2021-02-03 21:37:42 +07:00 committed by andri lim
parent 5248be1766
commit 2566cebfe0
1 changed files with 3 additions and 3 deletions

View File

@ -382,7 +382,7 @@ proc processCustomGenesisConfig(customGenesis: JsonNode): ConfigStatus =
checkForFork(forkDetails, daoForkBlock, 0.toBlockNumber)
checkForFork(forkDetails, eip150Block, homesteadBlock)
validateConfigValue(forkDetails, eip150Hash, JString, Hash256)
validateConfigValue(forkDetails, eip150Hash, JString, Hash256, checkError = false)
checkForFork(forkDetails, eip155Block, eip150Block)
checkForFork(forkDetails, eip158Block, eip155Block)
checkForFork(forkDetails, byzantiumBlock, eip158Block)
@ -394,14 +394,14 @@ proc processCustomGenesisConfig(customGenesis: JsonNode): ConfigStatus =
else:
error "No chain configuration found."
quit(1)
validateConfigValue(customGenesis, nonce, JString, BlockNonce)
validateConfigValue(customGenesis, nonce, JString, BlockNonce, checkError = false)
validateConfigValue(customGenesis, extraData, JSTring, seq[byte], checkError = false)
validateConfigValue(customGenesis, gasLimit, JString, int64, checkError = false)
validateConfigValue(customGenesis, difficulty, JString, UInt256)
if customGenesis.hasKey("alloc"):
alloc = customGenesis["alloc"]
validateConfigValue(customGenesis, mixHash, JString, Hash256)
validateConfigValue(customGenesis, mixHash, JString, Hash256, checkError = false)
validateConfigValue(customGenesis, coinbase, JString, EthAddress, checkError = false)
validateConfigValue(customGenesis, timestamp, JString, EthTime, checkError = false)