Add a GetFeePerVSize() accessor to CFeeRate, and use it in the BlockAssembler

This commit is contained in:
Suhas Daftuar 2025-10-10 05:16:11 -04:00
parent b5f245f6f2
commit 6f3e8eb300
2 changed files with 3 additions and 1 deletions

View File

@ -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;
}

View File

@ -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
*/