@@ -1773,8 +1773,6 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
1773
1773
1774
1774
int64_t nSigOpsCost = GetTransactionSigOpCost (tx, view, STANDARD_SCRIPT_VERIFY_FLAGS);
1775
1775
1776
- if (!tx.HasValidFee ())
1777
- return state.DoS (0 , false , REJECT_INVALID, " bad-fees" );
1778
1776
CAmount nFees = tx.GetFee ()[policyAsset];
1779
1777
1780
1778
// nModifiedFees includes any fee deltas from PrioritiseTransaction
@@ -2621,9 +2619,6 @@ bool CheckTxInputs(const CTransaction& tx, CValidationState& state, const CCoins
2621
2619
}
2622
2620
}
2623
2621
2624
- // Tally transaction fees
2625
- if (!tx.HasValidFee ())
2626
- return state.DoS (100 , false , REJECT_INVALID, " bad-txns-fee-outofrange" );
2627
2622
if (!VerifyAmounts (inputs, tx, pvChecks, cacheStore))
2628
2623
return state.DoS (100 , false , REJECT_INVALID, " bad-txns-in-belowout" , false ,
2629
2624
strprintf (" value in (%s) < value out" , FormatMoney (nValueIn)));
@@ -2642,9 +2637,6 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
2642
2637
if (pvChecks)
2643
2638
pvChecks->reserve (tx.vin .size ());
2644
2639
2645
- // Tally validity checked in CheckTxInputs
2646
- CAmountMap fee = tx.GetFee ();
2647
-
2648
2640
// The first loop above does all the inexpensive checks.
2649
2641
// Only if ALL inputs pass do we perform expensive ECDSA signature checks.
2650
2642
// Helps prevent CPU exhaustion attacks.
@@ -3290,8 +3282,6 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
3290
3282
mLocksCreated .insert (std::make_pair (txout.scriptPubKey .GetWithdrawLockGenesisHash (), std::make_pair (COutPoint (tx.GetHash (), j), txout.nValue .GetAmount ())));
3291
3283
}
3292
3284
}
3293
- if (!tx.HasValidFee ())
3294
- return state.DoS (100 , error (" ConnectBlock(): transaction fee overflowed" ), REJECT_INVALID, " bad-fee-outofrange" );
3295
3285
mapFees += tx.GetFee ();
3296
3286
if (!MoneyRange (mapFees))
3297
3287
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
3304
3294
return state.DoS (100 , error (" ConnectBlock(): total block reward overflowed" ), REJECT_INVALID, " bad-blockreward-outofrange" );
3305
3295
if (!VerifyCoinbaseAmount (block.vtx [0 ], blockReward))
3306
3296
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)" ,
3308
3298
blockReward[policyAsset]),
3309
3299
REJECT_INVALID, " bad-cb-amount" );
3310
3300
0 commit comments