aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCrypto City <cryptocity@example.com>2023-05-11 11:43:09 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2023-05-11 13:59:41 +0000
commit1fad8cc919b2e309d306eedac009508e8fdd171f (patch)
tree470ac26a9d09530f70dcc9c3386057d46f102e2e /src
parentMerge pull request #8766 (diff)
downloadmonero-1fad8cc919b2e309d306eedac009508e8fdd171f.tar.xz
blockchain: ensure base fee cannot reach 0
reported by sech1
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_core/blockchain.cpp2
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
{