mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-04 15:18:05 +01:00
tx fees, policy: cast with static_cast instead of C-Style cast
This commit is contained in:
parent
a0e3eb7549
commit
0889e07987
1 changed files with 6 additions and 6 deletions
|
@ -610,11 +610,11 @@ void CBlockPolicyEstimator::processTransaction(const CTxMemPoolEntry& entry, boo
|
|||
CFeeRate feeRate(entry.GetFee(), entry.GetTxSize());
|
||||
|
||||
mapMemPoolTxs[hash].blockHeight = txHeight;
|
||||
unsigned int bucketIndex = feeStats->NewTx(txHeight, (double)feeRate.GetFeePerK());
|
||||
unsigned int bucketIndex = feeStats->NewTx(txHeight, static_cast<double>(feeRate.GetFeePerK()));
|
||||
mapMemPoolTxs[hash].bucketIndex = bucketIndex;
|
||||
unsigned int bucketIndex2 = shortStats->NewTx(txHeight, (double)feeRate.GetFeePerK());
|
||||
unsigned int bucketIndex2 = shortStats->NewTx(txHeight, static_cast<double>(feeRate.GetFeePerK()));
|
||||
assert(bucketIndex == bucketIndex2);
|
||||
unsigned int bucketIndex3 = longStats->NewTx(txHeight, (double)feeRate.GetFeePerK());
|
||||
unsigned int bucketIndex3 = longStats->NewTx(txHeight, static_cast<double>(feeRate.GetFeePerK()));
|
||||
assert(bucketIndex == bucketIndex3);
|
||||
}
|
||||
|
||||
|
@ -640,9 +640,9 @@ bool CBlockPolicyEstimator::processBlockTx(unsigned int nBlockHeight, const CTxM
|
|||
// Feerates are stored and reported as BTC-per-kb:
|
||||
CFeeRate feeRate(entry->GetFee(), entry->GetTxSize());
|
||||
|
||||
feeStats->Record(blocksToConfirm, (double)feeRate.GetFeePerK());
|
||||
shortStats->Record(blocksToConfirm, (double)feeRate.GetFeePerK());
|
||||
longStats->Record(blocksToConfirm, (double)feeRate.GetFeePerK());
|
||||
feeStats->Record(blocksToConfirm, static_cast<double>(feeRate.GetFeePerK()));
|
||||
shortStats->Record(blocksToConfirm, static_cast<double>(feeRate.GetFeePerK()));
|
||||
longStats->Record(blocksToConfirm, static_cast<double>(feeRate.GetFeePerK()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue