diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-04-29 23:04:08 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-04-30 21:03:10 +0800 |
commit | de0549fabb8be4dbaf382ee68ec1b702cb0c5c97 (patch) | |
tree | bf3f8c78ff0d9e82e111d63ac12021d350520e8e /cmd/geth/admin.go | |
parent | 3fef60190384106af390dd23a65384b9cc6e4a28 (diff) | |
download | dexon-de0549fabb8be4dbaf382ee68ec1b702cb0c5c97.tar.gz dexon-de0549fabb8be4dbaf382ee68ec1b702cb0c5c97.tar.zst dexon-de0549fabb8be4dbaf382ee68ec1b702cb0c5c97.zip |
cmd/geth, cmd/mist, cmd/utils, eth, p2p: support trusted peers
Diffstat (limited to 'cmd/geth/admin.go')
-rw-r--r-- | cmd/geth/admin.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/geth/admin.go b/cmd/geth/admin.go index 31f8d4400..a07e694de 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("suggestPeer", js.suggestPeer) + admin.Set("trustPeer", js.trustPeer) 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) suggestPeer(call otto.FunctionCall) otto.Value { +func (js *jsre) trustPeer(call otto.FunctionCall) otto.Value { nodeURL, err := call.Argument(0).ToString() if err != nil { fmt.Println(err) return otto.FalseValue() } - err = js.ethereum.SuggestPeer(nodeURL) + err = js.ethereum.TrustPeer(nodeURL) if err != nil { fmt.Println(err) return otto.FalseValue() |