accounts/abi: delete duplicate error check (#29136)

pull/28940/head
yzb 9 months ago committed by GitHub
parent a732ad0364
commit b408b3e5fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      accounts/abi/type.go

@ -179,9 +179,6 @@ func NewType(t string, internalType string, components []ArgumentMarshaling) (ty
return Type{}, errors.New("abi: purely anonymous or underscored field is not supported")
}
fieldName := ResolveNameConflict(name, func(s string) bool { return used[s] })
if err != nil {
return Type{}, err
}
used[fieldName] = true
if !isValidFieldName(fieldName) {
return Type{}, fmt.Errorf("field %d has invalid name", idx)

Loading…
Cancel
Save