diff options
author | Maran <maran.hidskes@gmail.com> | 2014-05-27 17:49:42 +0800 |
---|---|---|
committer | Maran <maran.hidskes@gmail.com> | 2014-05-27 17:49:42 +0800 |
commit | 1ab865a994758cef8a6bf75a3cc263f16a97d847 (patch) | |
tree | 59bbf8b696cf0e9a6d5cb7cbb0849a33d4dd896f /ethereal/ui/gui.go | |
parent | 07204f129e277fb5f63f080d6a146e28603f872e (diff) | |
download | dexon-1ab865a994758cef8a6bf75a3cc263f16a97d847.tar dexon-1ab865a994758cef8a6bf75a3cc263f16a97d847.tar.gz dexon-1ab865a994758cef8a6bf75a3cc263f16a97d847.tar.bz2 dexon-1ab865a994758cef8a6bf75a3cc263f16a97d847.tar.lz dexon-1ab865a994758cef8a6bf75a3cc263f16a97d847.tar.xz dexon-1ab865a994758cef8a6bf75a3cc263f16a97d847.tar.zst dexon-1ab865a994758cef8a6bf75a3cc263f16a97d847.zip |
Adding new blocks on broadcast
Diffstat (limited to 'ethereal/ui/gui.go')
-rw-r--r-- | ethereal/ui/gui.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ethereal/ui/gui.go b/ethereal/ui/gui.go index 7577de1fa..18e13d985 100644 --- a/ethereal/ui/gui.go +++ b/ethereal/ui/gui.go @@ -141,7 +141,7 @@ func (gui *Gui) setInitialBlockChain() { blk := gui.eth.BlockChain().GetBlock(sBlk) for ; blk != nil; blk = gui.eth.BlockChain().GetBlock(sBlk) { sBlk = blk.PrevHash - gui.processBlock(blk) + gui.processBlock(blk, true) } } @@ -163,8 +163,8 @@ func (gui *Gui) readPreviousTransactions() { it.Release() } -func (gui *Gui) processBlock(block *ethchain.Block) { - gui.win.Root().Call("addBlock", ethpub.NewPBlock(block)) +func (gui *Gui) processBlock(block *ethchain.Block, initial bool) { + gui.win.Root().Call("addBlock", ethpub.NewPBlock(block), initial) } func (gui *Gui) setWalletValue(amount, unconfirmedFunds *big.Int) { @@ -203,6 +203,7 @@ func (gui *Gui) update() { select { case b := <-blockChan: block := b.Resource.(*ethchain.Block) + gui.processBlock(block, false) if bytes.Compare(block.Coinbase, gui.addr) == 0 { gui.setWalletValue(gui.eth.StateManager().CurrentState().GetAccount(gui.addr).Amount, nil) } |