blockchain: ensure base fee cannot reach 0

reported by sech1
This commit is contained in:
Crypto City 2023-05-11 11:43:09 +00:00 committed by moneromooo-monero
parent a2e8d1d427
commit d391ac0f7e
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

View File

@ -3709,7 +3709,7 @@ uint64_t Blockchain::get_dynamic_base_fee(uint64_t block_reward, size_t median_b
div128_64(hi, lo, median_block_weight, &hi, &lo, NULL, NULL);
assert(hi == 0);
lo -= lo / 20;
return lo;
return lo == 0 ? 1 : lo;
}
else
{