mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-27 12:35:00 +00:00
allow custom net parser to skip chain config and only parse genesis data
This commit is contained in:
parent
455756c098
commit
8e4b917fd3
@ -379,7 +379,7 @@ proc processCustomGenesisConfig(customGenesis: JsonNode): ConfigStatus =
|
|||||||
|
|
||||||
|
|
||||||
if customGenesis.hasKey("config"):
|
if customGenesis.hasKey("config"):
|
||||||
# Validate all fork blocks for custom genesis
|
# Validate all fork blocks for custom genesis
|
||||||
let forkDetails = customGenesis["config"]
|
let forkDetails = customGenesis["config"]
|
||||||
validateConfigValue(forkDetails, chainId, JInt, ChainId)
|
validateConfigValue(forkDetails, chainId, JInt, ChainId)
|
||||||
checkForFork(forkDetails, homesteadBlock, 0.toBlockNumber)
|
checkForFork(forkDetails, homesteadBlock, 0.toBlockNumber)
|
||||||
@ -397,9 +397,7 @@ proc processCustomGenesisConfig(customGenesis: JsonNode): ConfigStatus =
|
|||||||
checkForFork(forkDetails, istanbulBlock, petersburgBlock)
|
checkForFork(forkDetails, istanbulBlock, petersburgBlock)
|
||||||
checkForFork(forkDetails, muirGlacierBlock, istanbulBlock)
|
checkForFork(forkDetails, muirGlacierBlock, istanbulBlock)
|
||||||
checkForFork(forkDetails, istanbulBlock, berlinBlock)
|
checkForFork(forkDetails, istanbulBlock, berlinBlock)
|
||||||
else:
|
|
||||||
error "No chain configuration found."
|
|
||||||
quit(1)
|
|
||||||
validateConfigValue(customGenesis, nonce, JString, BlockNonce, checkError = false)
|
validateConfigValue(customGenesis, nonce, JString, BlockNonce, checkError = false)
|
||||||
validateConfigValue(customGenesis, extraData, JSTring, seq[byte], checkError = false)
|
validateConfigValue(customGenesis, extraData, JSTring, seq[byte], checkError = false)
|
||||||
validateConfigValue(customGenesis, gasLimit, JString, int64, checkError = false)
|
validateConfigValue(customGenesis, gasLimit, JString, int64, checkError = false)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user