mirror of
https://github.com/monero-project/monero.git
synced 2026-01-28 15:24:40 +01:00
Fee changes from ArticMine
https://github.com/ArticMine/Monero-Documents/blob/master/MoneroScaling2021-02.pdf with a change to use 1.7 instead of 2.0 for the max long term increase rate
This commit is contained in:
@@ -70,6 +70,7 @@ void NodeRPCProxy::invalidate()
|
||||
m_dynamic_base_fee_estimate = 0;
|
||||
m_dynamic_base_fee_estimate_cached_height = 0;
|
||||
m_dynamic_base_fee_estimate_grace_blocks = 0;
|
||||
m_dynamic_base_fee_estimate_vector.clear();
|
||||
m_fee_quantization_mask = 1;
|
||||
m_rpc_version = 0;
|
||||
m_target_height = 0;
|
||||
@@ -210,7 +211,7 @@ boost::optional<std::string> NodeRPCProxy::get_earliest_height(uint8_t version,
|
||||
return boost::optional<std::string>();
|
||||
}
|
||||
|
||||
boost::optional<std::string> NodeRPCProxy::get_dynamic_base_fee_estimate(uint64_t grace_blocks, uint64_t &fee)
|
||||
boost::optional<std::string> NodeRPCProxy::get_dynamic_base_fee_estimate_2021_scaling(uint64_t grace_blocks, std::vector<uint64_t> &fees)
|
||||
{
|
||||
uint64_t height;
|
||||
|
||||
@@ -238,13 +239,24 @@ boost::optional<std::string> NodeRPCProxy::get_dynamic_base_fee_estimate(uint64_
|
||||
m_dynamic_base_fee_estimate = resp_t.fee;
|
||||
m_dynamic_base_fee_estimate_cached_height = height;
|
||||
m_dynamic_base_fee_estimate_grace_blocks = grace_blocks;
|
||||
m_dynamic_base_fee_estimate_vector = !resp_t.fees.empty() ? std::move(resp_t.fees) : std::vector<uint64_t>{m_dynamic_base_fee_estimate};
|
||||
m_fee_quantization_mask = resp_t.quantization_mask;
|
||||
}
|
||||
|
||||
fee = m_dynamic_base_fee_estimate;
|
||||
fees = m_dynamic_base_fee_estimate_vector;
|
||||
return boost::optional<std::string>();
|
||||
}
|
||||
|
||||
boost::optional<std::string> NodeRPCProxy::get_dynamic_base_fee_estimate(uint64_t grace_blocks, uint64_t &fee)
|
||||
{
|
||||
std::vector<uint64_t> fees;
|
||||
auto res = get_dynamic_base_fee_estimate_2021_scaling(grace_blocks, fees);
|
||||
if (res)
|
||||
return res;
|
||||
fee = fees[0];
|
||||
return boost::none;
|
||||
}
|
||||
|
||||
boost::optional<std::string> NodeRPCProxy::get_fee_quantization_mask(uint64_t &fee_quantization_mask)
|
||||
{
|
||||
uint64_t height;
|
||||
|
||||
Reference in New Issue
Block a user