Blockchain: remove old fee calc logic

This commit is contained in:
jeffro256
2024-03-10 13:30:46 -05:00
parent 7b7958bbd9
commit 7194506792
7 changed files with 32 additions and 313 deletions
+4 -7
View File
@@ -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();