From 1fad8cc919b2e309d306eedac009508e8fdd171f Mon Sep 17 00:00:00 2001 From: Crypto City Date: Thu, 11 May 2023 11:43:09 +0000 Subject: [PATCH] blockchain: ensure base fee cannot reach 0 reported by sech1 --- src/cryptonote_core/blockchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 6329718c52..35fa77688c 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 {