mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Make sure coinbase has no fees
This commit is contained in:
parent
796072852d
commit
cb2ee26d12
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue