mirror of
https://codeberg.org/wowario/wownero
synced 2026-11-14 09:14:11 +01:00
Add new dynamic fees to ZMQ
This commit is contained in:
committed by
Lee *!* Clagett
parent
df76543369
commit
9002681c1e
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user