aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist/ui_lib.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-02-05 10:16:16 +0800
committerFelix Lange <fjl@twurst.com>2015-02-06 07:03:59 +0800
commit56f777b2fc77275bc636562b66a08b19afe2ec56 (patch)
treec9a34bd23e13adb0d850957b9a66cd748d34b3e3 /cmd/mist/ui_lib.go
parent8e8ec8f5f8974aafeac5e4a9ead76878fe22cefd (diff)
downloadgo-tangerine-56f777b2fc77275bc636562b66a08b19afe2ec56.tar.gz
go-tangerine-56f777b2fc77275bc636562b66a08b19afe2ec56.tar.zst
go-tangerine-56f777b2fc77275bc636562b66a08b19afe2ec56.zip
cmd/ethereum, cmd/mist, core, eth, javascript, xeth: fixes for new p2p API
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)
}
}