From fa723e3d43e63e8424d97d21d8f2cc8136aba206 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 30 Sep 2020 15:23:17 +0200 Subject: [PATCH] Initialize default-initialized uint256 consensus params to zero explicitly --- src/chainparams.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 8c23fbdf1fe..7998357bc79 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -291,6 +291,8 @@ public: } bin = ParseHex(signet_challenge[0]); + consensus.nMinimumChainWork = uint256{}; + consensus.defaultAssumeValid = uint256{}; m_assumed_blockchain_size = 0; m_assumed_chain_state_size = 0; chainTxData = ChainTxData{ @@ -309,7 +311,9 @@ public: consensus.signet_blocks = true; consensus.signet_challenge.assign(bin.begin(), bin.end()); consensus.nSubsidyHalvingInterval = 210000; + consensus.BIP16Exception = uint256{}; consensus.BIP34Height = 1; + consensus.BIP34Hash = uint256{}; consensus.BIP65Height = 1; consensus.BIP66Height = 1; consensus.CSVHeight = 1; @@ -389,8 +393,8 @@ public: consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nStartTime = Consensus::BIP9Deployment::ALWAYS_ACTIVE; consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT; - consensus.nMinimumChainWork = uint256S("0x00"); - consensus.defaultAssumeValid = uint256S("0x00"); + consensus.nMinimumChainWork = uint256{}; + consensus.defaultAssumeValid = uint256{}; pchMessageStart[0] = 0xfa; pchMessageStart[1] = 0xbf;