Merge pull request #5941

d37d30f blockchain: tweak fee as a function of median values (moneromooo-monero)
This commit is contained in:
luigi1111 2019-10-14 18:11:13 -05:00
commit 37a72fd6ae
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010
1 changed files with 2 additions and 1 deletions

View File

@ -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;