@@ -1773,8 +1773,6 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
17731773
17741774 int64_t nSigOpsCost = GetTransactionSigOpCost (tx, view, STANDARD_SCRIPT_VERIFY_FLAGS);
17751775
1776- if (!tx.HasValidFee ())
1777- return state.DoS (0 , false , REJECT_INVALID, " bad-fees" );
17781776 CAmount nFees = tx.GetFee ()[policyAsset];
17791777
17801778 // nModifiedFees includes any fee deltas from PrioritiseTransaction
@@ -2621,9 +2619,6 @@ bool CheckTxInputs(const CTransaction& tx, CValidationState& state, const CCoins
26212619 }
26222620 }
26232621
2624- // Tally transaction fees
2625- if (!tx.HasValidFee ())
2626- return state.DoS (100 , false , REJECT_INVALID, " bad-txns-fee-outofrange" );
26272622 if (!VerifyAmounts (inputs, tx, pvChecks, cacheStore))
26282623 return state.DoS (100 , false , REJECT_INVALID, " bad-txns-in-belowout" , false ,
26292624 strprintf (" value in (%s) < value out" , FormatMoney (nValueIn)));
@@ -2642,9 +2637,6 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
26422637 if (pvChecks)
26432638 pvChecks->reserve (tx.vin .size ());
26442639
2645- // Tally validity checked in CheckTxInputs
2646- CAmountMap fee = tx.GetFee ();
2647-
26482640 // The first loop above does all the inexpensive checks.
26492641 // Only if ALL inputs pass do we perform expensive ECDSA signature checks.
26502642 // Helps prevent CPU exhaustion attacks.
@@ -3290,8 +3282,6 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
32903282 mLocksCreated .insert (std::make_pair (txout.scriptPubKey .GetWithdrawLockGenesisHash (), std::make_pair (COutPoint (tx.GetHash (), j), txout.nValue .GetAmount ())));
32913283 }
32923284 }
3293- if (!tx.HasValidFee ())
3294- return state.DoS (100 , error (" ConnectBlock(): transaction fee overflowed" ), REJECT_INVALID, " bad-fee-outofrange" );
32953285 mapFees += tx.GetFee ();
32963286 if (!MoneyRange (mapFees))
32973287 return state.DoS (100 , error (" ConnectBlock(): total block reward overflowed" ), REJECT_INVALID, " bad-blockreward-outofrange" );
@@ -3304,7 +3294,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
33043294 return state.DoS (100 , error (" ConnectBlock(): total block reward overflowed" ), REJECT_INVALID, " bad-blockreward-outofrange" );
33053295 if (!VerifyCoinbaseAmount (block.vtx [0 ], blockReward))
33063296 return state.DoS (100 ,
3307- error (" ConnectBlock(): coinbase pays too much (limit=%d)" ,
3297+ error (" ConnectBlock(): coinbase pays too much, has fee or blinded outputs (limit=%d)" ,
33083298 blockReward[policyAsset]),
33093299 REJECT_INVALID, " bad-cb-amount" );
33103300
0 commit comments