MCPcopy Create free account
hub / github.com/ElementsProject/elements / _removeTx

Method _removeTx

src/policy/fees.cpp:499–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

497}
498
499bool CBlockPolicyEstimator::_removeTx(const uint256& hash, bool inBlock)
500{
501 AssertLockHeld(m_cs_fee_estimator);
502 std::map<uint256, TxStatsInfo>::iterator pos = mapMemPoolTxs.find(hash);
503 if (pos != mapMemPoolTxs.end()) {
504 feeStats->removeTx(pos->second.blockHeight, nBestSeenHeight, pos->second.bucketIndex, inBlock);
505 shortStats->removeTx(pos->second.blockHeight, nBestSeenHeight, pos->second.bucketIndex, inBlock);
506 longStats->removeTx(pos->second.blockHeight, nBestSeenHeight, pos->second.bucketIndex, inBlock);
507 mapMemPoolTxs.erase(hash);
508 return true;
509 } else {
510 return false;
511 }
512}
513
514CBlockPolicyEstimator::CBlockPolicyEstimator()
515 : nBestSeenHeight(0), firstRecordedHeight(0), historicalFirst(0), historicalBest(0), trackedTxs(0), untrackedTxs(0)

Callers

nothing calls this directly

Calls 4

findMethod · 0.80
removeTxMethod · 0.80
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected