Auto merge of #3090 - bitcartel:3084_log_expired_txid, r=bitcartel

Closes #3084.  Log txid when removing expired transactions from mempool.
This commit is contained in:
Homu 2018-03-19 14:59:30 -07:00
commit 70e2522306
2 changed files with 2 additions and 1 deletions

View File

@ -17,7 +17,7 @@ from decimal import Decimal
class MempoolTxExpiryTest(BitcoinTestFramework):
def setup_nodes(self):
return start_nodes(4, self.options.tmpdir, [["-nuparams=5ba81b19:205", "-txexpirydelta=4"]] * 4)
return start_nodes(4, self.options.tmpdir, [["-nuparams=5ba81b19:205", "-txexpirydelta=4", "-debug=mempool"]] * 4)
# Test before, at, and after expiry block
# TODO: Test case of dependent txs in reorgs

View File

@ -271,6 +271,7 @@ void CTxMemPool::removeExpired(unsigned int nBlockHeight)
for (const CTransaction& tx : transactionsToRemove) {
list<CTransaction> removed;
remove(tx, removed, true);
LogPrint("mempool", "Removing expired txid: %s\n", tx.GetHash().ToString());
}
}