Skip to content

Commit

Permalink
Merge pull request #783 from zcoinofficial/mempool_celanup_fix
Browse files Browse the repository at this point in the history
Mempool cleanup fix
  • Loading branch information
riordant authored Dec 4, 2019
2 parents 9728ead + 011ac04 commit 7e82896
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4039,7 +4039,7 @@ bool ActivateBestChain(CValidationState &state, const CChainParams &chainparams,
}

//clear all old sigma spend transaction from mempool, to stat padding
if (chainActive.Height() == ::Params().GetConsensus().nSigmaPaddingBlock) {
if ((chainActive.Height() + 1) == ::Params().GetConsensus().nSigmaPaddingBlock) {
LOCK2(cs_main, mempool.cs);
for (CTxMemPool::indexed_transaction_set::iterator mi = mempool.mapTx.begin();
mi != mempool.mapTx.end(); ++mi)
Expand Down
3 changes: 0 additions & 3 deletions src/sigma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,6 @@ bool CheckSigmaSpendTransaction(
if (!isVerifyDB) {
bool fShouldPad = (nHeight != INT_MAX && nHeight >= params.nSigmaPaddingBlock) ||
(nHeight == INT_MAX && chainActive.Height() >= params.nSigmaPaddingBlock);
//Accept both padded and not padded spends at HF block
if(nHeight == params.nSigmaPaddingBlock)
fShouldPad = fPadding;
if (fPadding != fShouldPad)
return state.DoS(1, error("Incorrect sigma spend transaction version"));
}
Expand Down

0 comments on commit 7e82896

Please sign in to comment.