Skip to content

Commit

Permalink
blockchain: ensure base fee cannot reach 0
Browse files Browse the repository at this point in the history
reported by sech1
  • Loading branch information
Crypto City authored and moneromooo-monero committed May 11, 2023
1 parent 2f45d5c commit 1fad8cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cryptonote_core/blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3710,7 +3710,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
{
Expand Down

0 comments on commit 1fad8cc

Please sign in to comment.