| 497 | } |
| 498 | |
| 499 | bool 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 | |
| 514 | CBlockPolicyEstimator::CBlockPolicyEstimator() |
| 515 | : nBestSeenHeight(0), firstRecordedHeight(0), historicalFirst(0), historicalBest(0), trackedTxs(0), untrackedTxs(0) |