mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
Pass pointers to existing CTxMemPoolEntries to fee estimation
This commit is contained in:
@@ -594,14 +594,14 @@ void CTxMemPool::removeConflicts(const CTransaction &tx)
|
||||
void CTxMemPool::removeForBlock(const std::vector<CTransactionRef>& vtx, unsigned int nBlockHeight)
|
||||
{
|
||||
LOCK(cs);
|
||||
std::vector<CTxMemPoolEntry> entries;
|
||||
std::vector<const CTxMemPoolEntry*> entries;
|
||||
for (const auto& tx : vtx)
|
||||
{
|
||||
uint256 hash = tx->GetHash();
|
||||
|
||||
indexed_transaction_set::iterator i = mapTx.find(hash);
|
||||
if (i != mapTx.end())
|
||||
entries.push_back(*i);
|
||||
entries.push_back(&*i);
|
||||
}
|
||||
// Before the txs in the new block have been removed from the mempool, update policy estimates
|
||||
minerPolicyEstimator->processBlock(nBlockHeight, entries);
|
||||
|
||||
Reference in New Issue
Block a user