added shh back in

This commit is contained in:
obscuren 2015-01-05 17:12:52 +01:00
parent 66b05433b6
commit f16810c48e
4 changed files with 10 additions and 3 deletions

View File

@ -866,6 +866,7 @@ ApplicationWindow {
model: ListModel { id: pastPeers }
Component.onCompleted: {
pastPeers.insert(0, {text: "poc-8.ethdev.com:30303"})
/*
var ips = eth.pastPeers()
for(var i = 0; i < ips.length; i++) {

View File

@ -112,7 +112,7 @@ func (gui *Gui) Start(assetPath string) {
// Expose the eth library and the ui library to QML
context.SetVar("gui", gui)
context.SetVar("eth", gui.uiLib)
//context.SetVar("shh", gui.whisper)
context.SetVar("shh", gui.whisper)
// Load the main QML interface
data, _ := ethutil.Config.Db.Get([]byte("KeyRing"))

View File

@ -195,7 +195,9 @@ func (ui *UiLib) Connect(button qml.Object) {
}
func (ui *UiLib) ConnectToPeer(addr string) {
ui.eth.SuggestPeer(addr)
if err := ui.eth.SuggestPeer(addr); err != nil {
guilogger.Infoln(err)
}
}
func (ui *UiLib) AssetPath(p string) string {

View File

@ -100,7 +100,11 @@ func exit(err error) {
func StartEthereum(ethereum *eth.Ethereum, UseSeed bool) {
clilogger.Infof("Starting %s", ethereum.ClientIdentity())
ethereum.Start(UseSeed)
err := ethereum.Start(UseSeed)
if err != nil {
exit(err)
}
RegisterInterrupt(func(sig os.Signal) {
ethereum.Stop()
logger.Flush()