add comment for size check in body validation

This commit is contained in:
Jared Wasinger 2025-06-09 19:52:04 +02:00 committed by Felix Lange
parent 525f5607e8
commit 799a5b1c76
2 changed files with 1 additions and 1 deletions

View file

@ -49,6 +49,7 @@ func NewBlockValidator(config *params.ChainConfig, blockchain *BlockChain) *Bloc
// header's transaction and uncle roots. The headers are assumed to be already
// validated at this point.
func (v *BlockValidator) ValidateBody(block *types.Block) error {
// check EIP 7934 RLP-encoded block size cap
if v.config.IsOsaka(block.Number(), block.Time()) && block.Size() > params.BlockRLPSizeCap {
return ErrBlockOversized
}

View file

@ -127,7 +127,6 @@ func (miner *Miner) generateWork(genParam *generateParams, witness bool) *newPay
if int(work.size)+params.WithdrawalSize > maxBlockSize {
break
}
includedWithdrawals = append(includedWithdrawals, withdrawal)
work.size += params.WithdrawalSize
}