aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/method.go
diff options
context:
space:
mode:
authorYondon Fu <yondon.fu@gmail.com>2017-12-19 10:16:25 +0800
committerYondon Fu <yondon.fu@gmail.com>2017-12-19 10:16:25 +0800
commitcf7aba36c82a1a6c2b2c9e5c623045093b1827eb (patch)
tree4eebc93fc1c32456bfb6670b02f548a632f4d734 /accounts/abi/method.go
parent3857cdc267e3192697f561df0a0f827f65dfb6b5 (diff)
downloadgo-tangerine-cf7aba36c82a1a6c2b2c9e5c623045093b1827eb.tar
go-tangerine-cf7aba36c82a1a6c2b2c9e5c623045093b1827eb.tar.gz
go-tangerine-cf7aba36c82a1a6c2b2c9e5c623045093b1827eb.tar.bz2
go-tangerine-cf7aba36c82a1a6c2b2c9e5c623045093b1827eb.tar.lz
go-tangerine-cf7aba36c82a1a6c2b2c9e5c623045093b1827eb.tar.xz
go-tangerine-cf7aba36c82a1a6c2b2c9e5c623045093b1827eb.tar.zst
go-tangerine-cf7aba36c82a1a6c2b2c9e5c623045093b1827eb.zip
accounts/abi: update array type check in method.go. Add more packing tests
Diffstat (limited to 'accounts/abi/method.go')
-rw-r--r--accounts/abi/method.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/accounts/abi/method.go b/accounts/abi/method.go
index 609a71f07..673695aa8 100644
--- a/accounts/abi/method.go
+++ b/accounts/abi/method.go
@@ -51,8 +51,8 @@ func (method Method) pack(args ...interface{}) ([]byte, error) {
// input offset is the bytes offset for packed output
inputOffset := 0
for _, input := range method.Inputs {
- if input.Type.IsArray {
- inputOffset += (32 * input.Type.SliceSize)
+ if input.Type.T == ArrayTy {
+ inputOffset += (32 * input.Type.Size)
} else {
inputOffset += 32
}