|
|
|
@ -334,9 +334,9 @@ void CBlockPolicyEstimator::processTransaction(const CTxMemPoolEntry& entry, boo
@@ -334,9 +334,9 @@ void CBlockPolicyEstimator::processTransaction(const CTxMemPoolEntry& entry, boo
|
|
|
|
|
mapMemPoolTxs[hash].bucketIndex = feeStats.NewTx(txHeight, (double)feeRate.GetFeePerK()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void CBlockPolicyEstimator::processBlockTx(unsigned int nBlockHeight, const CTxMemPoolEntry& entry) |
|
|
|
|
void CBlockPolicyEstimator::processBlockTx(unsigned int nBlockHeight, const CTxMemPoolEntry* entry) |
|
|
|
|
{ |
|
|
|
|
if (!removeTx(entry.GetTx().GetHash())) { |
|
|
|
|
if (!removeTx(entry->GetTx().GetHash())) { |
|
|
|
|
// This transaction wasn't being tracked for fee estimation
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
@ -344,7 +344,7 @@ void CBlockPolicyEstimator::processBlockTx(unsigned int nBlockHeight, const CTxM
@@ -344,7 +344,7 @@ void CBlockPolicyEstimator::processBlockTx(unsigned int nBlockHeight, const CTxM
|
|
|
|
|
// How many blocks did it take for miners to include this transaction?
|
|
|
|
|
// blocksToConfirm is 1-based, so a transaction included in the earliest
|
|
|
|
|
// possible block has confirmation count of 1
|
|
|
|
|
int blocksToConfirm = nBlockHeight - entry.GetHeight(); |
|
|
|
|
int blocksToConfirm = nBlockHeight - entry->GetHeight(); |
|
|
|
|
if (blocksToConfirm <= 0) { |
|
|
|
|
// This can't happen because we don't process transactions from a block with a height
|
|
|
|
|
// lower than our greatest seen height
|
|
|
|
@ -353,13 +353,13 @@ void CBlockPolicyEstimator::processBlockTx(unsigned int nBlockHeight, const CTxM
@@ -353,13 +353,13 @@ void CBlockPolicyEstimator::processBlockTx(unsigned int nBlockHeight, const CTxM
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Feerates are stored and reported as BTC-per-kb:
|
|
|
|
|
CFeeRate feeRate(entry.GetFee(), entry.GetTxSize()); |
|
|
|
|
CFeeRate feeRate(entry->GetFee(), entry->GetTxSize()); |
|
|
|
|
|
|
|
|
|
feeStats.Record(blocksToConfirm, (double)feeRate.GetFeePerK()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void CBlockPolicyEstimator::processBlock(unsigned int nBlockHeight, |
|
|
|
|
std::vector<CTxMemPoolEntry>& entries) |
|
|
|
|
std::vector<const CTxMemPoolEntry*>& entries) |
|
|
|
|
{ |
|
|
|
|
if (nBlockHeight <= nBestSeenHeight) { |
|
|
|
|
// Ignore side chains and re-orgs; assuming they are random
|
|
|
|
|