@ -281,19 +281,16 @@ void TxConfirmStats::removeTx(unsigned int entryHeight, unsigned int nBestSeenHe
}
}
void CBlockPolicyEstimator : : removeTx ( uint256 hash )
bool CBlockPolicyEstimator : : removeTx ( uint256 hash )
{
std : : map < uint256 , TxStatsInfo > : : iterator pos = mapMemPoolTxs . find ( hash ) ;
if ( pos = = mapMemPoolTxs . end ( ) ) {
LogPrint ( " estimatefee " , " Blockpolicy error mempool tx %s not found for removeTx \n " ,
hash . ToString ( ) . c_str ( ) ) ;
return ;
if ( pos ! = mapMemPoolTxs . end ( ) ) {
feeStats . removeTx ( pos - > second . blockHeight , nBestSeenHeight , pos - > second . bucketIndex ) ;
mapMemPoolTxs . erase ( hash ) ;
return true ;
} else {
return false ;
}
unsigned int entryHeight = pos - > second . blockHeight ;
unsigned int bucketIndex = pos - > second . bucketIndex ;
feeStats . removeTx ( entryHeight , nBestSeenHeight , bucketIndex ) ;
mapMemPoolTxs . erase ( hash ) ;
}
CBlockPolicyEstimator : : CBlockPolicyEstimator ( const CFeeRate & _minRelayFee )