Remove extraneous LogPrint from fee estimation
Once priority estimation was removed, not all transactions in the mempool are tracked in the fee estimation mempool tracking. So there is no error if a transaction is not found for removal.
This commit is contained in:
parent
123ea73624
commit
4df44794c9
2 changed files with 8 additions and 11 deletions
|
@ -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);
|
std::map<uint256, TxStatsInfo>::iterator pos = mapMemPoolTxs.find(hash);
|
||||||
if (pos == mapMemPoolTxs.end()) {
|
if (pos != mapMemPoolTxs.end()) {
|
||||||
LogPrint("estimatefee", "Blockpolicy error mempool tx %s not found for removeTx\n",
|
feeStats.removeTx(pos->second.blockHeight, nBestSeenHeight, pos->second.bucketIndex);
|
||||||
hash.ToString().c_str());
|
mapMemPoolTxs.erase(hash);
|
||||||
return;
|
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)
|
CBlockPolicyEstimator::CBlockPolicyEstimator(const CFeeRate& _minRelayFee)
|
||||||
|
|
|
@ -212,7 +212,7 @@ public:
|
||||||
void processTransaction(const CTxMemPoolEntry& entry, bool fCurrentEstimate);
|
void processTransaction(const CTxMemPoolEntry& entry, bool fCurrentEstimate);
|
||||||
|
|
||||||
/** Remove a transaction from the mempool tracking stats*/
|
/** Remove a transaction from the mempool tracking stats*/
|
||||||
void removeTx(uint256 hash);
|
bool removeTx(uint256 hash);
|
||||||
|
|
||||||
/** Return a feerate estimate */
|
/** Return a feerate estimate */
|
||||||
CFeeRate estimateFee(int confTarget);
|
CFeeRate estimateFee(int confTarget);
|
||||||
|
|
Loading…
Reference in a new issue