Merge pull request #8850

d391ac0 blockchain: ensure base fee cannot reach 0 (Crypto City)
This commit is contained in:
luigi1111 2023-07-06 21:30:09 -05:00
commit 770b8fba3d
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

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); div128_64(hi, lo, median_block_weight, &hi, &lo, NULL, NULL);
assert(hi == 0); assert(hi == 0);
lo -= lo / 20; lo -= lo / 20;
return lo; return lo == 0 ? 1 : lo;
} }
else else
{ {