diff options
author | Crypto City <cryptocity@example.com> | 2023-05-11 11:43:09 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2023-05-11 13:47:57 +0000 |
commit | d391ac0f7ec1cfd64c67766611ab13f50519ed06 (patch) | |
tree | 07850c49836c9fd122cf1edacc27efa2ca7edb6b /src/cryptonote_core/blockchain.cpp | |
parent | Merge pull request #8760 (diff) | |
download | monero-d391ac0f7ec1cfd64c67766611ab13f50519ed06.tar.xz |
blockchain: ensure base fee cannot reach 0
reported by sech1
Diffstat (limited to '')
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index dc20bd1ff..8036c84cd 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -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 { |