diff options
| author | tobtoht <tob@featherwallet.org> | 2025-07-10 17:32:31 +0000 |
|---|---|---|
| committer | tobtoht <tob@featherwallet.org> | 2025-07-10 17:32:31 +0000 |
| commit | 3e218c2021a8346e8adb87baaadfb7261ae1477a (patch) | |
| tree | ec15c69393fbf7919b50e99cc22fcbd253a1f391 /src/rpc/daemon_handler.cpp | |
| parent | 0b739fdf5857b70b1c79675bc992b9f9c66f8216 (diff) | |
| parent | 9002681c1ef192bbdddcb1c5f49eac1b647af207 (diff) | |
| download | monzero-core-3e218c2021a8346e8adb87baaadfb7261ae1477a.tar.gz monzero-core-3e218c2021a8346e8adb87baaadfb7261ae1477a.tar.xz monzero-core-3e218c2021a8346e8adb87baaadfb7261ae1477a.zip | |
Merge pull request #9958
9002681 Add new dynamic fees to ZMQ (Lee Clagett)
Diffstat (limited to 'src/rpc/daemon_handler.cpp')
| -rw-r--r-- | src/rpc/daemon_handler.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rpc/daemon_handler.cpp b/src/rpc/daemon_handler.cpp index f12a62891..c1e4c10bf 100644 --- a/src/rpc/daemon_handler.cpp +++ b/src/rpc/daemon_handler.cpp @@ -843,15 +843,20 @@ namespace rpc void DaemonHandler::handle(const GetFeeEstimate::Request& req, GetFeeEstimate::Response& res) { res.hard_fork_version = m_core.get_blockchain_storage().get_current_hard_fork_version(); - res.estimated_base_fee = m_core.get_blockchain_storage().get_dynamic_base_fee_estimate(req.num_grace_blocks); + if (res.hard_fork_version < HF_VERSION_PER_BYTE_FEE) { + res.fees.clear(); + res.estimated_base_fee = m_core.get_blockchain_storage().get_dynamic_base_fee_estimate(req.num_grace_blocks); res.size_scale = 1024; // per KiB fee res.fee_mask = 1; } else { + m_core.get_blockchain_storage().get_dynamic_base_fee_estimate_2021_scaling(req.num_grace_blocks, res.fees); + res.estimated_base_fee = res.fees.at(0); + res.size_scale = 1; // per byte fee res.fee_mask = Blockchain::get_fee_quantization_mask(); } |
