From 5bd72c12feaf5fa4b43173bf82d9ccb8ebececda Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Wed, 14 Dec 2016 11:25:31 -0500 Subject: [PATCH] Make sure coinbase has no fees --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 6a46e3b056..f48c529122 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1101,10 +1101,10 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state) if (tx.IsCoinBase()) { - // Coinbase transactions may not have eccessive scriptSigs + // Coinbase transactions may not have eccessive scriptSigs or any fee outputs if (tx.vin[0].scriptSig.size() < 2 || tx.vin[0].scriptSig.size() > 100) return state.DoS(100, false, REJECT_INVALID, "bad-cb-length"); - if (tx.GetFee() != 0) + if (tx.HasValidFee() || tx.GetFee() != 0) return state.DoS(100, false, REJECT_INVALID, "bad-cb-fee"); } else