forked from cerc-io/plugeth
accounts/abi: fixed comments
This commit is contained in:
parent
fc213c873d
commit
47372813ef
@ -91,9 +91,8 @@ func toGoSlice(i int, t Argument, output []byte) (interface{}, error) {
|
|||||||
// first we need to create a slice of the type
|
// first we need to create a slice of the type
|
||||||
var refSlice reflect.Value
|
var refSlice reflect.Value
|
||||||
switch elem.T {
|
switch elem.T {
|
||||||
case IntTy, UintTy, BoolTy: //we need to create the correct type of array otherwise we see the following issue;
|
case IntTy, UintTy, BoolTy:
|
||||||
//cannot unmarshal []*big.Int in to []uint32 as described in
|
// create a new reference slice matching the element type
|
||||||
//https://github.com/ethereum/go-ethereum/issues/2802
|
|
||||||
switch t.Type.Kind {
|
switch t.Type.Kind {
|
||||||
case reflect.Bool:
|
case reflect.Bool:
|
||||||
refSlice = reflect.ValueOf([]bool(nil))
|
refSlice = reflect.ValueOf([]bool(nil))
|
||||||
|
@ -91,8 +91,9 @@ func NewType(t string) (typ Type, err error) {
|
|||||||
}
|
}
|
||||||
typ.Elem = &sliceType
|
typ.Elem = &sliceType
|
||||||
typ.stringKind = sliceType.stringKind + t[len(res[1]):]
|
typ.stringKind = sliceType.stringKind + t[len(res[1]):]
|
||||||
//Altough we know that this is an array, we cannot return as we don't
|
// Altough we know that this is an array, we cannot return
|
||||||
//know the type of the element, however, if it is still an array, then don't determine the type
|
// 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 {
|
if typ.Elem.IsArray {
|
||||||
return typ, nil
|
return typ, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user