|
|
@ -136,20 +136,13 @@ func (gui *Gui) createWindow(comp qml.Object) *qml.Window { |
|
|
|
|
|
|
|
|
|
|
|
return gui.win |
|
|
|
return gui.win |
|
|
|
} |
|
|
|
} |
|
|
|
func (gui *Gui) recursiveAdd(sBlk []byte) { |
|
|
|
func (gui *Gui) setInitialBlockChain() { |
|
|
|
|
|
|
|
sBlk := gui.eth.BlockChain().LastBlockHash |
|
|
|
blk := gui.eth.BlockChain().GetBlock(sBlk) |
|
|
|
blk := gui.eth.BlockChain().GetBlock(sBlk) |
|
|
|
if blk != nil { |
|
|
|
for ; blk != nil; blk = gui.eth.BlockChain().GetBlock(sBlk) { |
|
|
|
//ethutil.Config.Log.Infoln("Adding block", blk)
|
|
|
|
sBlk = blk.PrevHash |
|
|
|
gui.processBlock(blk) |
|
|
|
gui.processBlock(blk) |
|
|
|
gui.recursiveAdd(blk.PrevHash) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
//ethutil.Config.Log.Debugln("At Genesis, added all blocks to GUI")
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
func (gui *Gui) setInitialBlockChain() { |
|
|
|
|
|
|
|
gui.recursiveAdd(gui.eth.BlockChain().LastBlockHash) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (gui *Gui) readPreviousTransactions() { |
|
|
|
func (gui *Gui) readPreviousTransactions() { |
|
|
|