aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-23 21:44:45 +0800
committerobscuren <geffobscura@gmail.com>2014-12-23 21:44:45 +0800
commite2e3fa3d11b37c8a22ebafe9c02dfd8089ac4d51 (patch)
tree98c7cc76b5c79f22073e87f9224626f4904c529a /cmd
parent9e5257b83b8572077b9c26e4ae9a9443f765bf6e (diff)
downloadgo-tangerine-e2e3fa3d11b37c8a22ebafe9c02dfd8089ac4d51.tar
go-tangerine-e2e3fa3d11b37c8a22ebafe9c02dfd8089ac4d51.tar.gz
go-tangerine-e2e3fa3d11b37c8a22ebafe9c02dfd8089ac4d51.tar.bz2
go-tangerine-e2e3fa3d11b37c8a22ebafe9c02dfd8089ac4d51.tar.lz
go-tangerine-e2e3fa3d11b37c8a22ebafe9c02dfd8089ac4d51.tar.xz
go-tangerine-e2e3fa3d11b37c8a22ebafe9c02dfd8089ac4d51.tar.zst
go-tangerine-e2e3fa3d11b37c8a22ebafe9c02dfd8089ac4d51.zip
Updated Mist to use new blocks
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mist/gui.go8
-rw-r--r--cmd/mist/html_container.go2
-rw-r--r--cmd/mist/qml_container.go2
3 files changed, 6 insertions, 6 deletions
diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go
index 1152f0dcd..e5e18bbaa 100644
--- a/cmd/mist/gui.go
+++ b/cmd/mist/gui.go
@@ -221,7 +221,7 @@ func (gui *Gui) setInitialChain(ancientBlocks bool) {
sBlk := gui.eth.ChainManager().LastBlockHash()
blk := gui.eth.ChainManager().GetBlock(sBlk)
for ; blk != nil; blk = gui.eth.ChainManager().GetBlock(sBlk) {
- sBlk = blk.PrevHash
+ sBlk = blk.ParentHash()
gui.processBlock(blk, true)
}
@@ -322,7 +322,7 @@ func (gui *Gui) readPreviousTransactions() {
}
func (gui *Gui) processBlock(block *types.Block, initial bool) {
- name := strings.Trim(gui.pipe.World().Config().Get("NameReg").Storage(block.Coinbase).Str(), "\x00")
+ name := strings.Trim(gui.pipe.World().Config().Get("NameReg").Storage(block.Coinbase()).Str(), "\x00")
b := xeth.NewJSBlock(block)
b.Name = name
@@ -400,7 +400,7 @@ func (gui *Gui) update() {
switch ev := ev.(type) {
case core.NewBlockEvent:
gui.processBlock(ev.Block, false)
- if bytes.Compare(ev.Block.Coinbase, gui.address()) == 0 {
+ if bytes.Compare(ev.Block.Coinbase(), gui.address()) == 0 {
gui.setWalletValue(gui.eth.ChainManager().State().GetBalance(gui.address()), nil)
}
@@ -438,7 +438,7 @@ func (gui *Gui) update() {
case <-peerUpdateTicker.C:
gui.setPeerInfo()
case <-generalUpdateTicker.C:
- statusText := "#" + gui.eth.ChainManager().CurrentBlock().Number.String()
+ statusText := "#" + gui.eth.ChainManager().CurrentBlock().Number().String()
lastBlockLabel.Set("text", statusText)
miningLabel.Set("text", "Mining @ "+strconv.FormatInt(gui.uiLib.miner.GetPow().GetHashrate(), 10)+"Khash")
diff --git a/cmd/mist/html_container.go b/cmd/mist/html_container.go
index b3fc219fa..bd11ccd57 100644
--- a/cmd/mist/html_container.go
+++ b/cmd/mist/html_container.go
@@ -139,7 +139,7 @@ func (app *HtmlApplication) Window() *qml.Window {
}
func (app *HtmlApplication) NewBlock(block *types.Block) {
- b := &xeth.JSBlock{Number: int(block.BlockInfo().Number), Hash: ethutil.Bytes2Hex(block.Hash())}
+ b := &xeth.JSBlock{Number: int(block.NumberU64()), Hash: ethutil.Bytes2Hex(block.Hash())}
app.webView.Call("onNewBlockCb", b)
}
diff --git a/cmd/mist/qml_container.go b/cmd/mist/qml_container.go
index a0a46f9b1..ed24737d0 100644
--- a/cmd/mist/qml_container.go
+++ b/cmd/mist/qml_container.go
@@ -66,7 +66,7 @@ func (app *QmlApplication) NewWatcher(quitChan chan bool) {
// Events
func (app *QmlApplication) NewBlock(block *types.Block) {
- pblock := &xeth.JSBlock{Number: int(block.BlockInfo().Number), Hash: ethutil.Bytes2Hex(block.Hash())}
+ pblock := &xeth.JSBlock{Number: int(block.NumberU64()), Hash: ethutil.Bytes2Hex(block.Hash())}
app.win.Call("onNewBlockCb", pblock)
}