diff options
| author | Alex Morcos <[email protected]> | 2016-11-29 13:55:26 -0500 |
|---|---|---|
| committer | Alex Morcos <[email protected]> | 2017-01-04 12:10:18 -0500 |
| commit | 78ae62d2646c5e6db410f324046d0c3b15e0ad0a (patch) | |
| tree | fe8f4588941c1b07ee376d40543823c4204a20db | |
| parent | Add extra logging to processBlock in fee estimation. (diff) | |
| download | discoin-78ae62d2646c5e6db410f324046d0c3b15e0ad0a.tar.xz discoin-78ae62d2646c5e6db410f324046d0c3b15e0ad0a.zip | |
Add clarifying comments to fee estimation
| -rw-r--r-- | src/policy/fees.cpp | 5 | ||||
| -rw-r--r-- | src/validation.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp index ec1dd492c..f1c93a497 100644 --- a/src/policy/fees.cpp +++ b/src/policy/fees.cpp @@ -281,6 +281,11 @@ void TxConfirmStats::removeTx(unsigned int entryHeight, unsigned int nBestSeenHe } } +// This function is called from CTxMemPool::removeUnchecked to ensure +// txs removed from the mempool for any reason are no longer +// tracked. Txs that were part of a block have already been removed in +// processBlockTx to ensure they are never double tracked, but it is +// of no harm to try to remove them again. bool CBlockPolicyEstimator::removeTx(uint256 hash) { std::map<uint256, TxStatsInfo>::iterator pos = mapMemPoolTxs.find(hash); diff --git a/src/validation.h b/src/validation.h index 0f421d59e..b41fa8aad 100644 --- a/src/validation.h +++ b/src/validation.h @@ -130,7 +130,7 @@ static const int64_t BLOCK_DOWNLOAD_TIMEOUT_PER_PEER = 500000; static const unsigned int DEFAULT_LIMITFREERELAY = 0; static const bool DEFAULT_RELAYPRIORITY = true; static const int64_t DEFAULT_MAX_TIP_AGE = 24 * 60 * 60; -/** Maximum age of our tip for us to be considered current for fee estimation */ +/** Maximum age of our tip in seconds for us to be considered current for fee estimation */ static const int64_t MAX_FEE_ESTIMATION_TIP_AGE = 3 * 60 * 60; /** Default for -permitbaremultisig */ |