mirror of
https://github.com/monero-project/monero.git
synced 2024-12-23 12:09:54 +00:00
Merge pull request #5941
d37d30f
blockchain: tweak fee as a function of median values (moneromooo-monero)
This commit is contained in:
commit
37a72fd6ae
1 changed files with 2 additions and 1 deletions
|
@ -3432,7 +3432,8 @@ uint64_t Blockchain::get_dynamic_base_fee_estimate(uint64_t grace_blocks) const
|
|||
}
|
||||
|
||||
const bool use_long_term_median_in_fee = version >= HF_VERSION_LONG_TERM_BLOCK_WEIGHT;
|
||||
uint64_t fee = get_dynamic_base_fee(base_reward, use_long_term_median_in_fee ? m_long_term_effective_median_block_weight : median, version);
|
||||
const uint64_t use_median_value = use_long_term_median_in_fee ? std::min<uint64_t>(median, m_long_term_effective_median_block_weight) : median;
|
||||
const uint64_t fee = get_dynamic_base_fee(base_reward, use_median_value, version);
|
||||
const bool per_byte = version < HF_VERSION_PER_BYTE_FEE;
|
||||
MDEBUG("Estimating " << grace_blocks << "-block fee at " << print_money(fee) << "/" << (per_byte ? "byte" : "kB"));
|
||||
return fee;
|
||||
|
|
Loading…
Reference in a new issue