Initialize default-initialized uint256 consensus params to zero explicitly

This commit is contained in:
MarcoFalke 2020-09-30 15:23:17 +02:00
parent fa729cdb2c
commit fa723e3d43
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

View File

@ -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;