diff options
author | RJ <rj@erisindustries.com> | 2016-11-04 06:25:19 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-11-04 06:25:19 +0800 |
commit | 2ad5dba50a65e7471d24da7a258087ff97e00f36 (patch) | |
tree | 2e9895224048875544eaa922b924b97257ba72e8 /accounts/abi/reflect.go | |
parent | ed2bc7fbe9a30c1861cffdd7d0fd570847a2ae0c (diff) | |
download | go-tangerine-2ad5dba50a65e7471d24da7a258087ff97e00f36.tar go-tangerine-2ad5dba50a65e7471d24da7a258087ff97e00f36.tar.gz go-tangerine-2ad5dba50a65e7471d24da7a258087ff97e00f36.tar.bz2 go-tangerine-2ad5dba50a65e7471d24da7a258087ff97e00f36.tar.lz go-tangerine-2ad5dba50a65e7471d24da7a258087ff97e00f36.tar.xz go-tangerine-2ad5dba50a65e7471d24da7a258087ff97e00f36.tar.zst go-tangerine-2ad5dba50a65e7471d24da7a258087ff97e00f36.zip |
accounts/abi: differentiate between static and dynamic arrays (#3121)
solves #3119
Signed-off-by: VoR0220 <rj@erisindustries.com>
Diffstat (limited to 'accounts/abi/reflect.go')
-rw-r--r-- | accounts/abi/reflect.go | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/accounts/abi/reflect.go b/accounts/abi/reflect.go index ab5020200..7970ba8ac 100644 --- a/accounts/abi/reflect.go +++ b/accounts/abi/reflect.go @@ -78,10 +78,6 @@ func set(dst, src reflect.Value, output Argument) error { case dstType.AssignableTo(src.Type()): dst.Set(src) case dstType.Kind() == reflect.Array && srcType.Kind() == reflect.Slice: - if !dstType.Elem().AssignableTo(r_byte) { - return fmt.Errorf("abi: cannot unmarshal %v in to array of elem %v", src.Type(), dstType.Elem()) - } - 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()) } |