mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 01:41:36 +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"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
|
||||||
"io"
|
"io"
|
||||||
"maps"
|
"maps"
|
||||||
"slices"
|
"slices"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/ethereum/go-ethereum/log"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/ethereum/go-ethereum/crypto"
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"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
|
// validate that code changes could plausibly be correct
|
||||||
// max code size of a contract)
|
// (none exceed max code size of a contract)
|
||||||
for _, codeChange := range e.CodeChanges {
|
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")
|
return fmt.Errorf("code change contained oversized code")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue