aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
diff options
context:
space:
mode:
authorAlex Morcos <[email protected]>2016-11-11 13:14:45 -0500
committerAlex Morcos <[email protected]>2017-01-04 12:09:34 -0500
commitd825838e6472f73c491f93506cb003472f071602 (patch)
treefac9c77e0b7b6c6cb2b5b198a31cf20ed1dc56a2 /src/txmempool.cpp
parentrename bool to validFeeEstimate (diff)
downloaddiscoin-d825838e6472f73c491f93506cb003472f071602.tar.xz
discoin-d825838e6472f73c491f93506cb003472f071602.zip
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 53f3e0e19..e97099eb2 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());