Fix removeForReorg to use MedianTimePast

This commit is contained in:
Suhas Daftuar
2015-11-23 16:06:12 -05:00
committed by Jack Grigg
parent e52ba51bda
commit 233c9eb635
3 changed files with 6 additions and 6 deletions

View File

@@ -2689,7 +2689,7 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
}
if (fBlocksDisconnected) {
mempool.removeForReorg(pcoinsTip, chainActive.Tip()->nHeight + 1);
mempool.removeForReorg(pcoinsTip, chainActive.Tip()->nHeight + 1, STANDARD_LOCKTIME_VERIFY_FLAGS);
}
mempool.check(pcoinsTip);
@@ -2777,7 +2777,7 @@ bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex) {
// ActivateBestChain considers blocks already in chainActive
// unconditionally valid already, so force disconnect away from it.
if (!DisconnectTip(state)) {
mempool.removeForReorg(pcoinsTip, chainActive.Tip()->nHeight + 1);
mempool.removeForReorg(pcoinsTip, chainActive.Tip()->nHeight + 1, STANDARD_LOCKTIME_VERIFY_FLAGS);
return false;
}
}
@@ -2793,7 +2793,7 @@ bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex) {
}
InvalidChainFound(pindex);
mempool.removeForReorg(pcoinsTip, chainActive.Tip()->nHeight + 1);
mempool.removeForReorg(pcoinsTip, chainActive.Tip()->nHeight + 1, STANDARD_LOCKTIME_VERIFY_FLAGS);
return true;
}