mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Pass pointers to existing CTxMemPoolEntries to fee estimation
This commit is contained in:
parent
d825838e64
commit
ebafdcabb1
3 changed files with 9 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue