diff options
author | ismaelsadeeq <ask4ismailsadiq@gmail.com> | 2023-09-01 11:03:21 +0100 |
---|---|---|
committer | ismaelsadeeq <ask4ismailsadiq@gmail.com> | 2023-11-22 11:48:21 +0100 |
commit | 0889e07987294d4ef2814abfca16d8e2a0c5f541 (patch) | |
tree | 494fd290593e8b4d1c5d1bccc82170cdd4cc7cd1 /src/policy | |
parent | a0e3eb7549d2ba4dd3af12b9ce65e29158f59078 (diff) |
tx fees, policy: cast with static_cast instead of C-Style cast
Diffstat (limited to 'src/policy')
-rw-r--r-- | src/policy/fees.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp index 654c4cf0ce..df5885b059 100644 --- a/src/policy/fees.cpp +++ b/src/policy/fees.cpp @@ -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; } |