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:59:41 +0000 |
commit | 1fad8cc919b2e309d306eedac009508e8fdd171f (patch) | |
tree | 470ac26a9d09530f70dcc9c3386057d46f102e2e /src | |
parent | Merge pull request #8766 (diff) | |
download | monero-1fad8cc919b2e309d306eedac009508e8fdd171f.tar.xz |
blockchain: ensure base fee cannot reach 0
reported by sech1
Diffstat (limited to 'src')
-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 6329718c5..35fa77688 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -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 { |