mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Fix removeForReorg to use MedianTimePast
This commit is contained in:
parent
b7fa4aa387
commit
2d8860e820
3 changed files with 6 additions and 6 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue