From 6f3e8eb3001a87d0a6d9ec8662ddb40ce7a673f4 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Fri, 10 Oct 2025 05:16:11 -0400 Subject: [PATCH] Add a GetFeePerVSize() accessor to CFeeRate, and use it in the BlockAssembler --- src/node/miner.cpp | 2 +- src/policy/feerate.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/node/miner.cpp b/src/node/miner.cpp index 3a1e9f65964..d11bd5c5e45 100644 --- a/src/node/miner.cpp +++ b/src/node/miner.cpp @@ -252,7 +252,7 @@ void BlockAssembler::addChunks() while (selected_transactions.size() > 0) { // Check to see if min fee rate is still respected. - if (chunk_feerate.fee < m_options.blockMinFeeRate.GetFee(chunk_feerate_vsize.size)) { + if (chunk_feerate_vsize << m_options.blockMinFeeRate.GetFeePerVSize()) { // Everything else we might consider has a lower feerate return; } diff --git a/src/policy/feerate.h b/src/policy/feerate.h index dfe35c65b44..5994fe9962b 100644 --- a/src/policy/feerate.h +++ b/src/policy/feerate.h @@ -57,6 +57,8 @@ public: */ CAmount GetFee(int32_t virtual_bytes) const; + FeePerVSize GetFeePerVSize() const { return m_feerate; } + /** * Return the fee in satoshis for a vsize of 1000 vbytes */