aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
diff options
context:
space:
mode:
authorSuhas Daftuar <[email protected]>2015-11-23 16:06:12 -0500
committerSuhas Daftuar <[email protected]>2015-11-30 14:35:17 -0500
commit2d8860e820e2ca73000f558eb9686206bec2652a (patch)
treeb30da37c98806571d0edfce8fe5731b1fe7131dc /src/txmempool.cpp
parentDon't call removeForReorg if DisconnectTip fails (diff)
downloaddiscoin-2d8860e820e2ca73000f558eb9686206bec2652a.tar.xz
discoin-2d8860e820e2ca73000f558eb9686206bec2652a.zip
Fix removeForReorg to use MedianTimePast
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r--src/txmempool.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 5a3062291..9d2513948 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -481,14 +481,14 @@ void CTxMemPool::remove(const CTransaction &origTx, std::list<CTransaction>& rem
}
}
-void CTxMemPool::removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMemPoolHeight)
+void CTxMemPool::removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMemPoolHeight, int flags)
{
// Remove transactions spending a coinbase which are now immature and no-longer-final transactions
LOCK(cs);
list<CTransaction> transactionsToRemove;
for (indexed_transaction_set::const_iterator it = mapTx.begin(); it != mapTx.end(); it++) {
const CTransaction& tx = it->GetTx();
- if (!IsFinalTx(tx, nMemPoolHeight, GetAdjustedTime())) {
+ if (!CheckFinalTx(tx, flags)) {
transactionsToRemove.push_back(tx);
} else if (it->GetSpendsCoinbase()) {
BOOST_FOREACH(const CTxIn& txin, tx.vin) {