Skip to content

Commit

Permalink
Fix check for nTemporaryTestnetForkDIP3Height (#2508)
Browse files Browse the repository at this point in the history
This caused a crash when performing a full-sync.
  • Loading branch information
codablock authored Nov 29, 2018
1 parent fc6d651 commit f965634
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/evo/cbtx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/llmq/quorums_blockprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f965634

Please sign in to comment.