From cb2ee26d12b5024c9166c418891e4dba5bdfb09b 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/validation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index db838346e7..606b5b0105 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -529,10 +529,10 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state, bool fChe 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