Merge pull request #5941
d37d30f
blockchain: tweak fee as a function of median values (moneromooo-monero)
This commit is contained in:
commit
37a72fd6ae
|
@ -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;
|
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;
|
const bool per_byte = version < HF_VERSION_PER_BYTE_FEE;
|
||||||
MDEBUG("Estimating " << grace_blocks << "-block fee at " << print_money(fee) << "/" << (per_byte ? "byte" : "kB"));
|
MDEBUG("Estimating " << grace_blocks << "-block fee at " << print_money(fee) << "/" << (per_byte ? "byte" : "kB"));
|
||||||
return fee;
|
return fee;
|
||||||
|
|
Loading…
Reference in New Issue