Skip to content

Commit 24b3aec

Browse files
committed
Call v.Type().Field(i) directly
1 parent 92d44f2 commit 24b3aec

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/types/block.internal.libevm_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ func TestBody_hasAnyOptionalFieldSet(t *testing.T) {
1717
assert.False(t, body.hasAnyOptionalFieldSet(), "body has no optional field set")
1818

1919
v := reflect.ValueOf(&body).Elem()
20-
typ := reflect.TypeOf(body)
2120
for i := 0; i < v.NumField(); i++ {
22-
fieldType := typ.Field(i)
21+
fieldType := v.Type().Field(i)
2322
tag := fieldType.Tag.Get("rlp")
2423
if !slices.Contains(strings.Split(tag, ","), "optional") {
2524
continue

0 commit comments

Comments
 (0)