cmd/ethereum, cmd/mist, core, eth, javascript, xeth: fixes for new p2p API
This commit is contained in:
@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user