diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-13 22:35:54 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-13 22:35:54 +0800 |
commit | 76fa75b39439e6c8c83ebc03fb32aa615227cc44 (patch) | |
tree | 9b755296ae96dd5e4ced28d6de4d5abfdeb33915 /javascript | |
parent | 75d164037fb9bbf75def7c5501727fd634ef124f (diff) | |
parent | 32a9c0ca809508c1648b8f44f3e09725af7a80d3 (diff) | |
download | dexon-76fa75b39439e6c8c83ebc03fb32aa615227cc44.tar dexon-76fa75b39439e6c8c83ebc03fb32aa615227cc44.tar.gz dexon-76fa75b39439e6c8c83ebc03fb32aa615227cc44.tar.bz2 dexon-76fa75b39439e6c8c83ebc03fb32aa615227cc44.tar.lz dexon-76fa75b39439e6c8c83ebc03fb32aa615227cc44.tar.xz dexon-76fa75b39439e6c8c83ebc03fb32aa615227cc44.tar.zst dexon-76fa75b39439e6c8c83ebc03fb32aa615227cc44.zip |
wip
Diffstat (limited to 'javascript')
-rw-r--r-- | javascript/javascript_runtime.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/javascript/javascript_runtime.go b/javascript/javascript_runtime.go index 398daf43a..0aa0f73e2 100644 --- a/javascript/javascript_runtime.go +++ b/javascript/javascript_runtime.go @@ -197,12 +197,13 @@ func (self *JSRE) watch(call otto.FunctionCall) otto.Value { } func (self *JSRE) addPeer(call otto.FunctionCall) otto.Value { - host, err := call.Argument(0).ToString() + nodeURL, err := call.Argument(0).ToString() if err != nil { return otto.FalseValue() } - self.ethereum.SuggestPeer(host) - + if err := self.ethereum.SuggestPeer(nodeURL); err != nil { + return otto.FalseValue() + } return otto.TrueValue() } |