aboutsummaryrefslogtreecommitdiff
path: root/src/node/interfaces.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/node/interfaces.cpp')
-rw-r--r--src/node/interfaces.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/node/interfaces.cpp b/src/node/interfaces.cpp
index f6dbe4f008..4c83df7eca 100644
--- a/src/node/interfaces.cpp
+++ b/src/node/interfaces.cpp
@@ -648,8 +648,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,
@@ -702,9 +703,9 @@ public:
if (!m_node.mempool) return true;
LockPoints lp;
CTxMemPoolEntry entry(tx, 0, 0, 0, 0, false, 0, lp);
- 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
{
@@ -806,7 +807,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());
}
}