aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
diff options
context:
space:
mode:
authorAlex Morcos <morcos@chaincode.com>2016-11-11 13:14:45 -0500
committerAlex Morcos <morcos@chaincode.com>2017-01-04 12:09:34 -0500
commitd825838e6472f73c491f93506cb003472f071602 (patch)
treefac9c77e0b7b6c6cb2b5b198a31cf20ed1dc56a2 /src/txmempool.cpp
parent6f06b268c1f383affb2cf397f325d48d25bc8880 (diff)
Always update fee estimates on new blocks.
All decisions about whether the transactions are valid data points are made at the time the transaction arrives. Updating on blocks all the time will now cause stale fee estimates to decay quickly when we restart a node.
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r--src/txmempool.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 53f3e0e199..e97099eb28 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -591,8 +591,7 @@ void CTxMemPool::removeConflicts(const CTransaction &tx)
/**
* Called when a block is connected. Removes from mempool and updates the miner fee estimator.
*/
-void CTxMemPool::removeForBlock(const std::vector<CTransactionRef>& vtx, unsigned int nBlockHeight,
- bool fCurrentEstimate)
+void CTxMemPool::removeForBlock(const std::vector<CTransactionRef>& vtx, unsigned int nBlockHeight)
{
LOCK(cs);
std::vector<CTxMemPoolEntry> entries;
@@ -605,7 +604,7 @@ void CTxMemPool::removeForBlock(const std::vector<CTransactionRef>& vtx, unsigne
entries.push_back(*i);
}
// Before the txs in the new block have been removed from the mempool, update policy estimates
- minerPolicyEstimator->processBlock(nBlockHeight, entries, fCurrentEstimate);
+ minerPolicyEstimator->processBlock(nBlockHeight, entries);
for (const auto& tx : vtx)
{
txiter it = mapTx.find(tx->GetHash());