diff options
author | Roc Yu <rociiu0112@gmail.com> | 2018-07-19 16:42:47 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-07-19 16:42:47 +0800 |
commit | 040dd5bd5d9ecf05cce666eeb395bc18e5e91342 (patch) | |
tree | 565d97c54013b5bb0c42c002604bbe714fdac395 | |
parent | dcdd57df6282a6cd43a6407e8626a5cdcca60482 (diff) | |
download | go-tangerine-040dd5bd5d9ecf05cce666eeb395bc18e5e91342.tar go-tangerine-040dd5bd5d9ecf05cce666eeb395bc18e5e91342.tar.gz go-tangerine-040dd5bd5d9ecf05cce666eeb395bc18e5e91342.tar.bz2 go-tangerine-040dd5bd5d9ecf05cce666eeb395bc18e5e91342.tar.lz go-tangerine-040dd5bd5d9ecf05cce666eeb395bc18e5e91342.tar.xz go-tangerine-040dd5bd5d9ecf05cce666eeb395bc18e5e91342.tar.zst go-tangerine-040dd5bd5d9ecf05cce666eeb395bc18e5e91342.zip |
accounts/abi: refactor Method#Sig() to use index in range iterator directly (#17198)
-rw-r--r-- | accounts/abi/method.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/accounts/abi/method.go b/accounts/abi/method.go index f434ffdbe..583105765 100644 --- a/accounts/abi/method.go +++ b/accounts/abi/method.go @@ -47,10 +47,8 @@ type Method struct { // Please note that "int" is substitute for its canonical representation "int256" func (method Method) Sig() string { types := make([]string, len(method.Inputs)) - i := 0 - for _, input := range method.Inputs { + for i, input := range method.Inputs { types[i] = input.Type.String() - i++ } return fmt.Sprintf("%v(%v)", method.Name, strings.Join(types, ",")) } |