From a923016a12aeba358c00a9fbe1a884093ece3b6f Mon Sep 17 00:00:00 2001 From: jangko Date: Wed, 31 Mar 2021 14:18:21 +0700 Subject: [PATCH] allow missing chainId in chain config --- nimbus/config.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nimbus/config.nim b/nimbus/config.nim index 052d313bf..9ad20bdfa 100644 --- a/nimbus/config.nim +++ b/nimbus/config.nim @@ -368,7 +368,7 @@ proc processCustomGenesisConfig(customGenesis: JsonNode): ConfigStatus = let config = getConfiguration() result = Success var - chainId = 0.ChainId + chainId = 1.ChainId homesteadBlock, daoForkblock, eip150Block, eip155Block, eip158Block, byzantiumBlock, constantinopleBlock = 0.toBlockNumber petersburgBlock, istanbulBlock, muirGlacierBlock, berlinBlock = 0.toBlockNumber eip150Hash, mixHash : MDigest[256] @@ -385,7 +385,7 @@ proc processCustomGenesisConfig(customGenesis: JsonNode): ConfigStatus = if customGenesis.hasKey("config"): # Validate all fork blocks for custom genesis let forkDetails = customGenesis["config"] - validateConfigValue(forkDetails, chainId, JInt, ChainId) + validateConfigValue(forkDetails, chainId, JInt, ChainId, checkError=false) checkForFork(forkDetails, homesteadBlock, 0.toBlockNumber) validateConfigValue(forkDetails, daoForkSupport, JBool, bool, checkError=false) if daoForkSupport == true: