Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
47372813
Unverified
Commit
47372813
authored
Dec 14, 2016
by
Jeffrey Wilcke
Committed by
Péter Szilágyi
Jan 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounts/abi: fixed comments
parent
fc213c87
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
abi.go
accounts/abi/abi.go
+2
-3
type.go
accounts/abi/type.go
+3
-2
No files found.
accounts/abi/abi.go
View file @
47372813
...
@@ -91,9 +91,8 @@ func toGoSlice(i int, t Argument, output []byte) (interface{}, error) {
...
@@ -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
))
...
...
accounts/abi/type.go
View file @
47372813
...
@@ -91,8 +91,9 @@ func NewType(t string) (typ Type, err error) {
...
@@ -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
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment