mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
cmd/eofdump: correctly read container type
This commit is contained in:
parent
ee8d477b88
commit
5475bc96ca
1 changed files with 5 additions and 4 deletions
|
|
@ -65,6 +65,7 @@ var (
|
||||||
vm.ErrInvalidCodeTermination.Error(): 23,
|
vm.ErrInvalidCodeTermination.Error(): 23,
|
||||||
vm.ErrUnreachableCode.Error(): 24,
|
vm.ErrUnreachableCode.Error(): 24,
|
||||||
}
|
}
|
||||||
|
initcode = "INITCODE"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RefTests struct {
|
type RefTests struct {
|
||||||
|
|
@ -72,9 +73,9 @@ type RefTests struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type EOFTest struct {
|
type EOFTest struct {
|
||||||
IsInitCode bool `json:"isInitCode"`
|
|
||||||
Code string `json:"code"`
|
Code string `json:"code"`
|
||||||
Results map[string]etResult `json:"results"`
|
Results map[string]etResult `json:"results"`
|
||||||
|
ContainerKind string `json:"containerKind"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type etResult struct {
|
type etResult struct {
|
||||||
|
|
@ -175,7 +176,7 @@ func ExecuteTest(src []byte) (int, int, error) {
|
||||||
total++
|
total++
|
||||||
// TODO(matt): all tests currently run against
|
// TODO(matt): all tests currently run against
|
||||||
// shanghai EOF, add support for custom forks.
|
// shanghai EOF, add support for custom forks.
|
||||||
_, err := parseAndValidate(tt.Code, tt.IsInitCode)
|
_, err := parseAndValidate(tt.Code, tt.ContainerKind == initcode)
|
||||||
if err2 := errors.Unwrap(err); err2 != nil {
|
if err2 := errors.Unwrap(err); err2 != nil {
|
||||||
err = err2
|
err = err2
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue