UkoeHB / monero

Monero: the secure, private, untraceable cryptocurrency
https://getmonero.org
Other
7 stars 4 forks source link

Fix base reward in get_dynamic_base_fee_estimate() #2

Closed UkoeHB closed 4 years ago

UkoeHB commented 4 years ago

get_dynamic_base_fee_estimate() should match check_fee()

Fee is calculated based on block reward, and the reward penalty takes into account 0.5*max_block_weight (both before and after HF_VERSION_EFFECTIVE_SHORT_TERM_MEDIAN_IN_PENALTY).

Moved median calculation according to best practice of 'keep definitions close to where they are used'.