diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-04-30 21:15:29 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-04-30 21:15:29 +0800 |
commit | 701591b403a8bae8c1dfb648a49d587968ff0c6a (patch) | |
tree | 9e253db29faf15056fa72f7a0094206b5ef39beb /cmd | |
parent | 1528dbc17101597348eefe3f3fb8d4f0d5c54b3c (diff) | |
download | dexon-701591b403a8bae8c1dfb648a49d587968ff0c6a.tar.gz dexon-701591b403a8bae8c1dfb648a49d587968ff0c6a.tar.zst dexon-701591b403a8bae8c1dfb648a49d587968ff0c6a.zip |
cmd, eth, p2p: fix review issues enumerated by Felix
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/geth/admin.go | 6 | ||||
-rw-r--r-- | cmd/geth/main.go | 2 | ||||
-rw-r--r-- | cmd/mist/main.go | 2 | ||||
-rw-r--r-- | cmd/mist/ui_lib.go | 2 | ||||
-rw-r--r-- | cmd/utils/flags.go | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/cmd/geth/admin.go b/cmd/geth/admin.go index a07e694de..77510b8b8 100644 --- a/cmd/geth/admin.go +++ b/cmd/geth/admin.go @@ -25,7 +25,7 @@ func (js *jsre) adminBindings() { js.re.Set("admin", struct{}{}) t, _ := js.re.Get("admin") admin := t.Object() - admin.Set("trustPeer", js.trustPeer) + admin.Set("addPeer", js.addPeer) admin.Set("startRPC", js.startRPC) admin.Set("stopRPC", js.stopRPC) admin.Set("nodeInfo", js.nodeInfo) @@ -243,13 +243,13 @@ func (js *jsre) stopRPC(call otto.FunctionCall) otto.Value { return otto.FalseValue() } -func (js *jsre) trustPeer(call otto.FunctionCall) otto.Value { +func (js *jsre) addPeer(call otto.FunctionCall) otto.Value { nodeURL, err := call.Argument(0).ToString() if err != nil { fmt.Println(err) return otto.FalseValue() } - err = js.ethereum.TrustPeer(nodeURL) + err = js.ethereum.AddPeer(nodeURL) if err != nil { fmt.Println(err) return otto.FalseValue() diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 036ee2d0c..ef007051c 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -232,7 +232,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso utils.IdentityFlag, utils.UnlockedAccountFlag, utils.PasswordFileFlag, - utils.BootNodesFlag, + utils.BootnodesFlag, utils.DataDirFlag, utils.BlockchainVersionFlag, utils.JSpathFlag, diff --git a/cmd/mist/main.go b/cmd/mist/main.go index 18fb919b4..1030d6ada 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -69,7 +69,7 @@ func init() { assetPathFlag, rpcCorsFlag, - utils.BootNodesFlag, + utils.BootnodesFlag, utils.DataDirFlag, utils.ListenPortFlag, utils.LogFileFlag, diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go index e1a3aa254..a20205b03 100644 --- a/cmd/mist/ui_lib.go +++ b/cmd/mist/ui_lib.go @@ -104,7 +104,7 @@ func (ui *UiLib) Connect(button qml.Object) { } func (ui *UiLib) ConnectToPeer(nodeURL string) { - if err := ui.eth.TrustPeer(nodeURL); err != nil { + if err := ui.eth.AddPeer(nodeURL); err != nil { guilogger.Infoln("TrustPeer error: " + err.Error()) } } diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 62b49cddc..c013510d8 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -202,7 +202,7 @@ var ( Usage: "Network listening port", Value: 30303, } - BootNodesFlag = cli.StringFlag{ + BootnodesFlag = cli.StringFlag{ Name: "bootnodes", Usage: "Space-separated enode URLs for p2p discovery bootstrap", Value: "", @@ -292,7 +292,7 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { NodeKey: GetNodeKey(ctx), Shh: ctx.GlobalBool(WhisperEnabledFlag.Name), Dial: true, - BootNodes: ctx.GlobalString(BootNodesFlag.Name), + BootNodes: ctx.GlobalString(BootnodesFlag.Name), } } |