From 47372813efa13e8f92b90e70ab46b69e6792d8c7 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Wed, 14 Dec 2016 23:34:27 +0100 Subject: accounts/abi: fixed comments --- accounts/abi/abi.go | 5 ++--- accounts/abi/type.go | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'accounts') diff --git a/accounts/abi/abi.go b/accounts/abi/abi.go index 3af8d41c6..627a2a0c4 100644 --- a/accounts/abi/abi.go +++ b/accounts/abi/abi.go @@ -91,9 +91,8 @@ func toGoSlice(i int, t Argument, output []byte) (interface{}, error) { // first we need to create a slice of the type var refSlice reflect.Value switch elem.T { - case IntTy, UintTy, BoolTy: //we need to create the correct type of array otherwise we see the following issue; - //cannot unmarshal []*big.Int in to []uint32 as described in - //https://github.com/ethereum/go-ethereum/issues/2802 + case IntTy, UintTy, BoolTy: + // create a new reference slice matching the element type switch t.Type.Kind { case reflect.Bool: refSlice = reflect.ValueOf([]bool(nil)) diff --git a/accounts/abi/type.go b/accounts/abi/type.go index 6fde7bf71..191c29955 100644 --- a/accounts/abi/type.go +++ b/accounts/abi/type.go @@ -91,8 +91,9 @@ func NewType(t string) (typ Type, err error) { } typ.Elem = &sliceType typ.stringKind = sliceType.stringKind + t[len(res[1]):] - //Altough we know that this is an array, we cannot return as we don't - //know the type of the element, however, if it is still an array, then don't determine the type + // Altough we know that this is an array, we cannot return + // as we don't know the type of the element, however, if it + // is still an array, then don't determine the type. if typ.Elem.IsArray { return typ, nil } -- cgit