aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist/ui_lib.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/mist/ui_lib.go')
-rw-r--r--cmd/mist/ui_lib.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go
index 7c5802076..2e557dba9 100644
--- a/cmd/mist/ui_lib.go
+++ b/cmd/mist/ui_lib.go
@@ -31,6 +31,7 @@ import (
"github.com/ethereum/go-ethereum/event/filter"
"github.com/ethereum/go-ethereum/javascript"
"github.com/ethereum/go-ethereum/miner"
+ "github.com/ethereum/go-ethereum/p2p/discover"
"github.com/ethereum/go-ethereum/xeth"
"github.com/obscuren/qml"
)
@@ -142,8 +143,13 @@ func (ui *UiLib) Connect(button qml.Object) {
}
}
-func (ui *UiLib) ConnectToPeer(addr string) {
- if err := ui.eth.SuggestPeer(addr); err != nil {
+func (ui *UiLib) ConnectToPeer(addr string, hexid string) {
+ id, err := discover.HexID(hexid)
+ if err != nil {
+ guilogger.Errorf("bad node ID: %v", err)
+ return
+ }
+ if err := ui.eth.SuggestPeer(addr, id); err != nil {
guilogger.Infoln(err)
}
}