[doc] always CleanupTemporaryCoins after a mempool trim
This commit is contained in:
1 parent
e72cb20c3f
commit
ba02c30b8a
1 file changed
+5
@@ -1470,6 +1470,10 @@ MempoolAcceptResult MemPoolAccept::AcceptSingleTransaction(const CTransactionRef
|
|||||||
// Limit the mempool, if appropriate.
|
// Limit the mempool, if appropriate.
|
||||||
if (!args.m_package_submission && !args.m_bypass_limits) {
|
if (!args.m_package_submission && !args.m_bypass_limits) {
|
||||||
LimitMempoolSize(m_pool, m_active_chainstate.CoinsTip());
|
LimitMempoolSize(m_pool, m_active_chainstate.CoinsTip());
|
||||||
|
// If mempool contents change, then the m_view cache is dirty. Given this isn't a package
|
||||||
|
// submission, we won't be using the cache anymore, but clear it anyway for clarity.
|
||||||
|
CleanupTemporaryCoins();
|
||||||
|
|
||||||
if (!m_pool.exists(ws.m_hash)) {
|
if (!m_pool.exists(ws.m_hash)) {
|
||||||
// The tx no longer meets our (new) mempool minimum feerate but could be reconsidered in a package.
|
// The tx no longer meets our (new) mempool minimum feerate but could be reconsidered in a package.
|
||||||
ws.m_state.Invalid(TxValidationResult::TX_RECONSIDERABLE, "mempool full");
|
ws.m_state.Invalid(TxValidationResult::TX_RECONSIDERABLE, "mempool full");
|
||||||
@@ -1831,6 +1835,7 @@ PackageMempoolAcceptResult MemPoolAccept::AcceptPackage(const Package& package,
|
|||||||
|
|
||||||
// Make sure we haven't exceeded max mempool size.
|
// Make sure we haven't exceeded max mempool size.
|
||||||
// Package transactions that were submitted to mempool or already in mempool may be evicted.
|
// Package transactions that were submitted to mempool or already in mempool may be evicted.
|
||||||
|
// If mempool contents change, then the m_view cache is dirty. It has already been cleared above.
|
||||||
LimitMempoolSize(m_pool, m_active_chainstate.CoinsTip());
|
LimitMempoolSize(m_pool, m_active_chainstate.CoinsTip());
|
||||||
|
|
||||||
for (const auto& tx : package) {
|
for (const auto& tx : package) {
|
||||||
|
|||||||
Reference in new issue
Block a user