From 174a6ac9c581a8ec73f57170650cd0becf400ef7 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 25 Oct 2019 16:56:55 +0000 Subject: [PATCH] tx_pool: fix divide by 0 in log Coverity 205394 --- src/cryptonote_core/tx_pool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp index 0d70f2992..392e611e9 100644 --- a/src/cryptonote_core/tx_pool.cpp +++ b/src/cryptonote_core/tx_pool.cpp @@ -324,7 +324,7 @@ namespace cryptonote ++m_cookie; - MINFO("Transaction added to pool: txid " << id << " weight: " << tx_weight << " fee/byte: " << (fee / (double)tx_weight)); + MINFO("Transaction added to pool: txid " << id << " weight: " << tx_weight << " fee/byte: " << (fee / (double)(tx_weight ? tx_weight : 1))); prune(m_txpool_max_weight);