Fix check for nTemporaryTestnetForkDIP3Height (#2508)

This caused a crash when performing a full-sync.
This commit is contained in:
Alexander Block 2018-11-29 09:12:51 +01:00 committed by GitHub
parent fc6d651c43
commit f96563462b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ bool CalcCbTxMerkleRootMNList(const CBlock& block, const CBlockIndex* pindexPrev
// BEGIN TEMPORARY CODE
const auto& consensus = Params().GetConsensus();
if (consensus.nTemporaryTestnetForkHeight != 0 &&
pindexPrev->nHeight + 1 >= consensus.nTemporaryTestnetForkDIP3Height &&
pindexPrev->nHeight + 1 > consensus.nTemporaryTestnetForkDIP3Height &&
pindexPrev->nHeight + 1 < consensus.nTemporaryTestnetForkHeight &&
chainActive[consensus.nTemporaryTestnetForkDIP3Height]->GetBlockHash() == consensus.nTemporaryTestnetForkDIP3BlockHash) {
for (auto& sme : sml.mnList) {

View File

@ -282,7 +282,7 @@ bool CQuorumBlockProcessor::IsCommitmentRequired(Consensus::LLMQType llmqType, c
LOCK(cs_main);
const auto& consensus = Params().GetConsensus();
if (consensus.nTemporaryTestnetForkDIP3Height != 0 &&
pindexPrev->nHeight + 1 >= consensus.nTemporaryTestnetForkDIP3Height &&
pindexPrev->nHeight + 1 > consensus.nTemporaryTestnetForkDIP3Height &&
pindexPrev->nHeight + 1 < consensus.nTemporaryTestnetForkHeight &&
chainActive[consensus.nTemporaryTestnetForkDIP3Height]->GetBlockHash() == consensus.nTemporaryTestnetForkDIP3BlockHash) {
allowMissingQc = true;