aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorjeffro256 <jeffro256@tutanota.com>2024-03-10 12:11:39 -0500
committerjeffro256 <jeffro256@tutanota.com>2024-03-10 13:30:46 -0500
commit71945067925d3bb15c039f5ed682ea40ab6b16a3 (patch)
treec4773e44919c8f1ecbc65b37389d7358e1962470 /src/rpc
parentMerge pull request #9004 (diff)
downloadmonero-71945067925d3bb15c039f5ed682ea40ab6b16a3.tar.xz
Blockchain: remove old fee calc logic
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/core_rpc_server.cpp6
-rw-r--r--src/rpc/daemon_handler.cpp11
2 files changed, 4 insertions, 13 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 9a0b02f70..f8407689c 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -3019,16 +3019,10 @@ namespace cryptonote
CHECK_PAYMENT(req, res, COST_PER_FEE_ESTIMATE);
- const uint8_t version = m_core.get_blockchain_storage().get_current_hard_fork_version();
- if (version >= HF_VERSION_2021_SCALING)
{
m_core.get_blockchain_storage().get_dynamic_base_fee_estimate_2021_scaling(req.grace_blocks, res.fees);
res.fee = res.fees[0];
}
- else
- {
- res.fee = m_core.get_blockchain_storage().get_dynamic_base_fee_estimate(req.grace_blocks);
- }
res.quantization_mask = Blockchain::get_fee_quantization_mask();
res.status = CORE_RPC_STATUS_OK;
return true;
diff --git a/src/rpc/daemon_handler.cpp b/src/rpc/daemon_handler.cpp
index 52067bd4d..48bd7ea86 100644
--- a/src/rpc/daemon_handler.cpp
+++ b/src/rpc/daemon_handler.cpp
@@ -831,14 +831,11 @@ 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.size_scale = 1024; // per KiB fee
- res.fee_mask = 1;
- }
- else
+ std::vector<uint64_t> fees;
+ m_core.get_blockchain_storage().get_dynamic_base_fee_estimate_2021_scaling(req.num_grace_blocks, fees);
+ res.estimated_base_fee = fees[0];
+
{
res.size_scale = 1; // per byte fee
res.fee_mask = Blockchain::get_fee_quantization_mask();