aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/reflect.go
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/abi/reflect.go')
-rw-r--r--accounts/abi/reflect.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/accounts/abi/reflect.go b/accounts/abi/reflect.go
index 8fa75df07..e953b77c1 100644
--- a/accounts/abi/reflect.go
+++ b/accounts/abi/reflect.go
@@ -24,7 +24,7 @@ import (
// indirect recursively dereferences the value until it either gets the value
// or finds a big.Int
func indirect(v reflect.Value) reflect.Value {
- if v.Kind() == reflect.Ptr && v.Elem().Type() != big_t {
+ if v.Kind() == reflect.Ptr && v.Elem().Type() != derefbig_t {
return indirect(v.Elem())
}
return v
@@ -73,15 +73,9 @@ func mustArrayToByteSlice(value reflect.Value) reflect.Value {
func set(dst, src reflect.Value, output Argument) error {
dstType := dst.Type()
srcType := src.Type()
-
switch {
- case dstType.AssignableTo(src.Type()):
+ case dstType.AssignableTo(srcType):
dst.Set(src)
- case dstType.Kind() == reflect.Array && srcType.Kind() == reflect.Slice:
- if dst.Len() < output.Type.SliceSize {
- return fmt.Errorf("abi: cannot unmarshal src (len=%d) in to dst (len=%d)", output.Type.SliceSize, dst.Len())
- }
- reflect.Copy(dst, src)
case dstType.Kind() == reflect.Interface:
dst.Set(src)
case dstType.Kind() == reflect.Ptr: