Skip to content

Commit acc2e4b

Browse files
committed
Bugfix: PrioritiseTransaction updates the mempool tx counter
The mempool's nTransactionsUpdated is used by getblocktemplate to trigger new invocations of CreateNewBlock().
1 parent 35da2ae commit acc2e4b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/txmempool.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,7 @@ void CTxMemPool::PrioritiseTransaction(const uint256& hash, const CAmount& nFeeD
865865
BOOST_FOREACH(txiter descendantIt, setDescendants) {
866866
mapTx.modify(descendantIt, update_ancestor_state(0, nFeeDelta, 0, 0));
867867
}
868+
++nTransactionsUpdated;
868869
}
869870
}
870871
LogPrintf("PrioritiseTransaction: %s feerate += %s\n", hash.ToString(), FormatMoney(nFeeDelta));

src/txmempool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ class CTxMemPool
411411
{
412412
private:
413413
uint32_t nCheckFrequency; //!< Value n means that n times in 2^32 we check.
414-
unsigned int nTransactionsUpdated;
414+
unsigned int nTransactionsUpdated; //!< Used by getblocktemplate to trigger CreateNewBlock() invocation
415415
CBlockPolicyEstimator* minerPolicyEstimator;
416416

417417
uint64_t totalTxSize; //!< sum of all mempool tx's virtual sizes. Differs from serialized tx size since witness data is discounted. Defined in BIP 141.

0 commit comments

Comments
 (0)