Changed to ChainEvent and fixed a nil pointer in transact

This commit is contained in:
obscuren
2015-02-17 22:20:47 +01:00
parent 11e12680eb
commit 7fc9b5b3f9
8 changed files with 47 additions and 14 deletions

View File

@ -394,7 +394,6 @@ func (gui *Gui) update() {
miningLabel := gui.getObjectByName("miningLabel")
events := gui.eth.EventMux().Subscribe(
core.NewBlockEvent{},
core.TxPreEvent{},
core.TxPostEvent{},
)
@ -407,11 +406,6 @@ func (gui *Gui) update() {
return
}
switch ev := ev.(type) {
case core.NewBlockEvent:
gui.processBlock(ev.Block, false)
balance := ethutil.CurrencyToString(gui.eth.ChainManager().State().GetBalance(gui.address()))
gui.getObjectByName("balanceLabel").Set("text", fmt.Sprintf("%v", balance))
case core.TxPreEvent:
tx := ev.Tx