accounts/abi: Gary's review feedback

This commit is contained in:
Guillaume Ballet 2019-07-05 11:04:41 +02:00
parent 1ee8697904
commit b7fb49c624
2 changed files with 3 additions and 3 deletions

View file

@ -25,13 +25,13 @@ import (
"errors"
"fmt"
"go/format"
"log"
"regexp"
"strings"
"text/template"
"unicode"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/log"
)
// Lang is a target programming language selector to generate bindings for.
@ -153,7 +153,7 @@ func Bind(types []string, abis []string, bytecodes []string, fsigs []map[string]
for pattern, name := range libs {
matched, err := regexp.Match("__\\$"+pattern+"\\$__", []byte(contracts[types[i]].InputBin))
if err != nil {
log.Fatalf("Could not search for pattern %v in %v: %v", pattern, contracts[types[i]], err)
log.Error("Could not search for pattern", "pattern", pattern, "contract", contracts[types[i]], "err", err)
}
if matched {
contracts[types[i]].Libraries[pattern] = name

View file

@ -82,7 +82,7 @@ func main() {
bins []string
types []string
sigs []map[string]string
libs map[string]string
libs = make(map[string]string)
)
if *solFlag != "" || *vyFlag != "" || *abiFlag == "-" {
// Generate the list of types to exclude from binding