Merge dd5f5713bc into merged_master (Bitcoin PR bitcoin/bitcoin#28391)

This commit is contained in:
Byron Hambly 2025-11-06 11:13:40 +02:00
commit d55f2b27cb
No known key found for this signature in database
GPG key ID: DE8F6EA20A661697
14 changed files with 113 additions and 94 deletions

View file

@ -649,8 +649,9 @@ public:
{
if (!m_node.mempool) return false;
LOCK(m_node.mempool->cs);
auto it = m_node.mempool->GetIter(txid);
return it && (*it)->GetCountWithDescendants() > 1;
const auto entry{m_node.mempool->GetEntry(Txid::FromUint256(txid))};
if (entry == nullptr) return false;
return entry->GetCountWithDescendants() > 1;
}
bool broadcastTransaction(const CTransactionRef& tx,
const CAmount& max_tx_fee,
@ -704,9 +705,9 @@ public:
LockPoints lp;
std::set<std::pair<uint256, COutPoint>> setPeginsSpent;
CTxMemPoolEntry entry(tx, 0, 0, 0, 0, false, 0, lp, setPeginsSpent);
const CTxMemPool::Limits& limits{m_node.mempool->m_limits};
LOCK(m_node.mempool->cs);
return m_node.mempool->CalculateMemPoolAncestors(entry, limits).has_value();
std::string err_string;
return m_node.mempool->CheckPackageLimits({tx}, entry.GetTxSize(), err_string);
}
CFeeRate estimateSmartFee(int num_blocks, bool conservative, FeeCalculation* calc) override
{
@ -808,7 +809,7 @@ public:
{
if (!m_node.mempool) return;
LOCK2(::cs_main, m_node.mempool->cs);
for (const CTxMemPoolEntry& entry : m_node.mempool->mapTx) {
for (const CTxMemPoolEntry& entry : m_node.mempool->entryAll()) {
notifications.transactionAddedToMempool(entry.GetSharedTx());
}
}