From 0ed8b838a991f81f79cc6ed4fa961c563203a7a2 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Fri, 10 Nov 2017 02:30:26 +0100 Subject: accounts/abi: fix event unpack into slice + The event slice unpacker doesn't correctly extract element from the slice. The indexed arguments are not ignored as they should be (the data offset should not include the indexed arguments). + The `Elem()` call in the slice unpack doesn't work. The Slice related tests fails because of that. + the check in the loop are suboptimal and have been extracted out of the loop. + extracted common code from event and method tupleUnpack --- accounts/abi/unpack.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'accounts/abi/unpack.go') diff --git a/accounts/abi/unpack.go b/accounts/abi/unpack.go index 051fc1916..5adb91ff7 100644 --- a/accounts/abi/unpack.go +++ b/accounts/abi/unpack.go @@ -202,4 +202,4 @@ func lengthPrefixPointsTo(index int, output []byte) (start int, length int, err //fmt.Printf("LENGTH PREFIX INFO: \nsize: %v\noffset: %v\nstart: %v\n", length, offset, start) return -} +} \ No newline at end of file -- cgit v1.2.3