Make CTxMemPoolEntry derive from TxGraph::Ref

This commit is contained in:
Suhas Daftuar
2025-01-09 10:36:34 -05:00
parent 92b0079fe3
commit 29a94d5b2f
11 changed files with 16 additions and 12 deletions

View File

@@ -1386,7 +1386,7 @@ CTxMemPool::ChangeSet::TxHandle CTxMemPool::ChangeSet::StageAddition(const CTran
{
LOCK(m_pool->cs);
Assume(m_to_add.find(tx->GetHash()) == m_to_add.end());
auto newit = m_to_add.emplace(tx, fee, time, entry_height, entry_sequence, spends_coinbase, sigops_cost, lp).first;
auto newit = m_to_add.emplace(TxGraph::Ref(), tx, fee, time, entry_height, entry_sequence, spends_coinbase, sigops_cost, lp).first;
CAmount delta{0};
m_pool->ApplyDelta(tx->GetHash(), delta);
if (delta) m_to_add.modify(newit, [&delta](CTxMemPoolEntry& e) { e.UpdateModifiedFee(delta); });