diff options
author | Felix Lange <fjl@twurst.com> | 2016-04-15 17:06:57 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-04-15 17:17:27 +0800 |
commit | 6fdd0893c3ebf57e5a9ba2af569c595c859ab902 (patch) | |
tree | 2df67265a0350b68b2f10ba2f7dcd292fef59ad0 /cmd | |
parent | 68c755a238f1a204087c2843f01d48fc6039716f (diff) | |
download | go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.gz go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.bz2 go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.lz go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.xz go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.zst go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.zip |
all: fix go vet warnings
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/bootnode/main.go | 2 | ||||
-rw-r--r-- | cmd/ethtest/main.go | 3 | ||||
-rw-r--r-- | cmd/geth/js_test.go | 5 | ||||
-rw-r--r-- | cmd/utils/jeth.go | 9 |
4 files changed, 10 insertions, 9 deletions
diff --git a/cmd/bootnode/main.go b/cmd/bootnode/main.go index 0cad5321b..7f74e9c70 100644 --- a/cmd/bootnode/main.go +++ b/cmd/bootnode/main.go @@ -79,7 +79,7 @@ func main() { func writeKey(target string) { key, err := crypto.GenerateKey() if err != nil { - log.Fatal("could not generate key: %v", err) + log.Fatalf("could not generate key: %v", err) } b := crypto.FromECDSA(key) if target == "-" { diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go index 3916e297f..d8f969636 100644 --- a/cmd/ethtest/main.go +++ b/cmd/ethtest/main.go @@ -76,7 +76,8 @@ func runTestWithReader(test string, r io.Reader) error { case "bk", "block", "blocktest", "blockchaintest", "blocktests", "blockchaintests": err = tests.RunBlockTestWithReader(params.MainNetHomesteadBlock, r, skipTests) case "st", "state", "statetest", "statetests": - err = tests.RunStateTestWithReader(tests.RuleSet{params.MainNetHomesteadBlock}, r, skipTests) + rs := tests.RuleSet{HomesteadBlock: params.MainNetHomesteadBlock} + err = tests.RunStateTestWithReader(rs, r, skipTests) case "tx", "transactiontest", "transactiontests": err = tests.RunTransactionTestsWithReader(r, skipTests) case "vm", "vmtest", "vmtests": diff --git a/cmd/geth/js_test.go b/cmd/geth/js_test.go index baf572359..ddfe0d400 100644 --- a/cmd/geth/js_test.go +++ b/cmd/geth/js_test.go @@ -89,7 +89,10 @@ func testREPL(t *testing.T, config func(*eth.Config)) (string, *testjethre, *nod // Initialize and register the Ethereum protocol accman := accounts.NewPlaintextManager(filepath.Join(tmp, "keystore")) db, _ := ethdb.NewMemDatabase() - core.WriteGenesisBlockForTesting(db, core.GenesisAccount{common.HexToAddress(testAddress), common.String2Big(testBalance)}) + core.WriteGenesisBlockForTesting(db, core.GenesisAccount{ + Address: common.HexToAddress(testAddress), + Balance: common.String2Big(testBalance), + }) ethConf := ð.Config{ ChainConfig: &core.ChainConfig{HomesteadBlock: new(big.Int)}, TestGenesisState: db, diff --git a/cmd/utils/jeth.go b/cmd/utils/jeth.go index 0017790f3..9410180b0 100644 --- a/cmd/utils/jeth.go +++ b/cmd/utils/jeth.go @@ -131,13 +131,11 @@ func (self *Jeth) NewAccount(call otto.FunctionCall) (response otto.Value) { return otto.FalseValue() } - if ret, err := call.Otto.Call("jeth.newAccount", nil, passwd); err == nil { + ret, err := call.Otto.Call("jeth.newAccount", nil, passwd) + if err == nil { return ret - } else { - fmt.Printf("%v\n", err) - return otto.FalseValue() } - + fmt.Println(err) return otto.FalseValue() } @@ -233,7 +231,6 @@ func (self *Jeth) Send(call otto.FunctionCall) (response otto.Value) { func throwJSExeception(msg interface{}) otto.Value { p, _ := otto.ToValue(msg) panic(p) - return p } // Sleep will halt the console for arg[0] seconds. |