From 796072852d1ba767a261f61d987b0091b8798741 Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Wed, 14 Dec 2016 11:04:03 -0500 Subject: [PATCH] Disallow 0-value fees --- src/primitives/transaction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp index 07ecd8e13f..d45e6de7da 100644 --- a/src/primitives/transaction.cpp +++ b/src/primitives/transaction.cpp @@ -163,7 +163,7 @@ bool CTransaction::HasValidFee() const CAmount fee = 0; if (vout[i].IsFee()) fee = vout[i].nValue.GetAmount(); - if (!MoneyRange(fee)) { + if (fee == 0 || !MoneyRange(fee)) { return false; } totalFee += fee;