aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2022-04-18 02:12:55 -0500
committerluigi1111 <luigi1111w@gmail.com>2022-04-18 02:12:55 -0500
commit2b999f5398426d2c4452e001cfebad34abb686ff (patch)
tree08bbe9298a72bd99ca3e35d3df667d81ef07711e /src/rpc/core_rpc_server.cpp
parentMerge pull request #8242 (diff)
parentFee changes from ArticMine (diff)
downloadmonero-2b999f5398426d2c4452e001cfebad34abb686ff.tar.xz
Merge pull request #7819
b030f20 Fee changes from ArticMine (moneromooo-monero) 9f786f0 epee: allow copying a rolling_median_t object (moneromooo-monero)
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r--src/rpc/core_rpc_server.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index d23d5cddb..b28583e37 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -2890,7 +2890,17 @@ namespace cryptonote
return r;
CHECK_PAYMENT(req, res, COST_PER_FEE_ESTIMATE);
- res.fee = m_core.get_blockchain_storage().get_dynamic_base_fee_estimate(req.grace_blocks);
+
+ 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;