move-only: make GetInfo a private CTxMemPool member

This allows it to be used by templated functions in a future commit.
This commit is contained in:
stickies-v
2025-06-23 18:19:55 +01:00
committed by marcofleon
parent eee473d9f3
commit de858ce2be
2 changed files with 5 additions and 4 deletions

View File

@@ -844,10 +844,6 @@ std::vector<CTxMemPool::indexed_transaction_set::const_iterator> CTxMemPool::Get
return iters;
}
static TxMempoolInfo GetInfo(CTxMemPool::indexed_transaction_set::const_iterator it) {
return TxMempoolInfo{it->GetSharedTx(), it->GetTime(), it->GetFee(), it->GetTxSize(), it->GetModifiedFee() - it->GetFee()};
}
std::vector<CTxMemPoolEntryRef> CTxMemPool::entryAll() const
{
AssertLockHeld(cs);

View File

@@ -431,6 +431,11 @@ private:
const Limits& limits
) const EXCLUSIVE_LOCKS_REQUIRED(cs);
static TxMempoolInfo GetInfo(CTxMemPool::indexed_transaction_set::const_iterator it)
{
return TxMempoolInfo{it->GetSharedTx(), it->GetTime(), it->GetFee(), it->GetTxSize(), it->GetModifiedFee() - it->GetFee()};
}
public:
indirectmap<COutPoint, const CTransaction*> mapNextTx GUARDED_BY(cs);
std::map<uint256, CAmount> mapDeltas GUARDED_BY(cs);