mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-07 13:18:43 +02:00
Merge #9262: Prefer coins that have fewer ancestors, sanity check txn before ATMP
cee1612reduce number of lookups in TransactionWithinChainLimit (Gregory Sanders)af9bedbTest for fix of txn chaining in wallet (Gregory Sanders)5882c09CreateTransaction: Don't return success with too-many-ancestor txn (Gregory Sanders)0b2294aSelectCoinsMinConf: Prefer coins with fewer ancestors (Gregory Sanders)
This commit is contained in:
@@ -1137,3 +1137,10 @@ void CTxMemPool::TrimToSize(size_t sizelimit, std::vector<uint256>* pvNoSpendsRe
|
||||
if (maxFeeRateRemoved > CFeeRate(0))
|
||||
LogPrint("mempool", "Removed %u txn, rolling minimum fee bumped to %s\n", nTxnRemoved, maxFeeRateRemoved.ToString());
|
||||
}
|
||||
|
||||
bool CTxMemPool::TransactionWithinChainLimit(const uint256& txid, size_t chainLimit) const {
|
||||
LOCK(cs);
|
||||
auto it = mapTx.find(txid);
|
||||
return it == mapTx.end() || (it->GetCountWithAncestors() < chainLimit &&
|
||||
it->GetCountWithDescendants() < chainLimit);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user