aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/daemon_handler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc/daemon_handler.cpp')
-rw-r--r--src/rpc/daemon_handler.cpp7
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();
}