mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-21 02:18:07 +00:00
core/types/bal: check correct max code size
This commit is contained in:
parent
3f41dd1c5b
commit
19c51b5098
1 changed files with 5 additions and 4 deletions
|
|
@ -23,12 +23,13 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
"io"
|
||||
"maps"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
|
|
@ -413,10 +414,10 @@ func (e *AccountAccess) validate(blockTxCount int) error {
|
|||
}
|
||||
}
|
||||
|
||||
// validate that code changes could plausibly be correct (none exceed
|
||||
// max code size of a contract)
|
||||
// validate that code changes could plausibly be correct
|
||||
// (none exceed max code size of a contract)
|
||||
for _, codeChange := range e.CodeChanges {
|
||||
if len(codeChange.Code) > params.MaxCodeSize {
|
||||
if len(codeChange.Code) > params.MaxCodeSizeAmsterdam {
|
||||
return fmt.Errorf("code change contained oversized code")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue