mempool, refactor: Convert uint256 to Txid

This commit is contained in:
marcofleon
2025-04-01 14:55:26 +01:00
parent aeb0f78330
commit f6c0d1d231
16 changed files with 65 additions and 69 deletions

View File

@@ -673,11 +673,11 @@ public:
LOCK(m_node.mempool->cs);
return m_node.mempool->exists(txid);
}
bool hasDescendantsInMempool(const uint256& txid) override
bool hasDescendantsInMempool(const Txid& txid) override
{
if (!m_node.mempool) return false;
LOCK(m_node.mempool->cs);
const auto entry{m_node.mempool->GetEntry(Txid::FromUint256(txid))};
const auto entry{m_node.mempool->GetEntry(txid)};
if (entry == nullptr) return false;
return entry->GetCountWithDescendants() > 1;
}
@@ -692,7 +692,7 @@ public:
// that Chain clients do not need to know about.
return TransactionError::OK == err;
}
void getTransactionAncestry(const uint256& txid, size_t& ancestors, size_t& descendants, size_t* ancestorsize, CAmount* ancestorfees) override
void getTransactionAncestry(const Txid& txid, size_t& ancestors, size_t& descendants, size_t* ancestorsize, CAmount* ancestorfees) override
{
ancestors = descendants = 0;
if (!m_node.mempool) return;