From 2566cebfe0b16bc8bffcab95baf96f87cd5baa42 Mon Sep 17 00:00:00 2001 From: jangko Date: Wed, 3 Feb 2021 21:37:42 +0700 Subject: [PATCH] fixes #548, custom network json parser now behaves like geth --- nimbus/config.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nimbus/config.nim b/nimbus/config.nim index a87eb1980..ea14d3814 100644 --- a/nimbus/config.nim +++ b/nimbus/config.nim @@ -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)