diff options
author | obscuren <geffobscura@gmail.com> | 2014-11-10 08:17:31 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-11-10 08:17:31 +0800 |
commit | cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f (patch) | |
tree | 95db04f468e66ebb26afd81bc72abea8fbcf7c0e /cmd | |
parent | f538ea25e46d59dfa225ed105343d9c6a9909c2c (diff) | |
download | go-tangerine-cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f.tar go-tangerine-cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f.tar.gz go-tangerine-cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f.tar.bz2 go-tangerine-cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f.tar.lz go-tangerine-cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f.tar.xz go-tangerine-cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f.tar.zst go-tangerine-cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f.zip |
Fixed bloom, updated mining & block processing
* Reverted back to process blocks in batches method
* Bloom generation and lookup fix
* Minor UI changed (mainly debug)
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/mist/assets/qml/main.qml | 2 | ||||
-rw-r--r-- | cmd/mist/assets/qml/views/chain.qml | 18 | ||||
-rw-r--r-- | cmd/mist/assets/qml/views/miner.qml | 2 | ||||
-rw-r--r-- | cmd/mist/gui.go | 13 | ||||
-rw-r--r-- | cmd/mist/ui_lib.go | 6 |
5 files changed, 20 insertions, 21 deletions
diff --git a/cmd/mist/assets/qml/main.qml b/cmd/mist/assets/qml/main.qml index d2a8d1d63..9f1f214a6 100644 --- a/cmd/mist/assets/qml/main.qml +++ b/cmd/mist/assets/qml/main.qml @@ -46,8 +46,8 @@ ApplicationWindow { Component.onCompleted: { var wallet = addPlugin("./views/wallet.qml", {noAdd: true, close: false, section: "ethereum", active: true}); var browser = addPlugin("./webapp.qml", {noAdd: true, close: false, section: "ethereum", active: true}); - var browser = addPlugin("./views/miner.qml", {noAdd: true, close: false, section: "ethereum", active: true}); root.browser = browser; + addPlugin("./views/miner.qml", {noAdd: true, close: false, section: "ethereum", active: true}); addPlugin("./views/transaction.qml", {noAdd: true, close: false, section: "legacy"}); addPlugin("./views/chain.qml", {noAdd: true, close: false, section: "legacy"}); diff --git a/cmd/mist/assets/qml/views/chain.qml b/cmd/mist/assets/qml/views/chain.qml index c4ceecfc0..6baf757a5 100644 --- a/cmd/mist/assets/qml/views/chain.qml +++ b/cmd/mist/assets/qml/views/chain.qml @@ -109,9 +109,9 @@ Rectangle { } if(initial){ - blockModel.append({size: block.size, number: block.number, name: block.name, gasLimit: block.gasLimit, gasUsed: block.gasUsed, coinbase: block.coinbase, hash: block.hash, txs: txs, txAmount: amount, time: block.time, prettyTime: convertToPretty(block.time)}) + blockModel.append({raw: block.raw, bloom: block.bloom, size: block.size, number: block.number, name: block.name, gasLimit: block.gasLimit, gasUsed: block.gasUsed, coinbase: block.coinbase, hash: block.hash, txs: txs, txAmount: amount, time: block.time, prettyTime: convertToPretty(block.time)}) } else { - blockModel.insert(0, {size: block.size, number: block.number, name: block.name, gasLimit: block.gasLimit, gasUsed: block.gasUsed, coinbase: block.coinbase, hash: block.hash, txs: txs, txAmount: amount, time: block.time, prettyTime: convertToPretty(block.time)}) + blockModel.insert(0, {bloom: block.bloom, size: block.size, number: block.number, name: block.name, gasLimit: block.gasLimit, gasUsed: block.gasUsed, coinbase: block.coinbase, hash: block.hash, txs: txs, txAmount: amount, time: block.time, prettyTime: convertToPretty(block.time)}) } } @@ -136,6 +136,7 @@ Rectangle { Text { text: '<h3>Block details</h3>'; color: "#F2F2F2"} Text { text: '<b>Block number:</b> ' + number + " (Size: " + size + ")"; color: "#F2F2F2"} Text { text: '<b>Hash:</b> ' + hash; color: "#F2F2F2"} + Text { text: '<b>Bloom:</b> ' + bloom; color: "#F2F2F2"} Text { text: '<b>Coinbase:</b> <' + name + '> ' + coinbase; color: "#F2F2F2"} Text { text: '<b>Block found at:</b> ' + prettyTime; color: "#F2F2F2"} Text { text: '<b>Gas used:</b> ' + gasUsed + " / " + gasLimit; color: "#F2F2F2"} @@ -222,11 +223,17 @@ Rectangle { text: "Contract" anchors.top: contractLabel.bottom anchors.left: parent.left - anchors.bottom: popup.bottom + anchors.right: parent.right wrapMode: Text.Wrap - width: parent.width - 30 height: 80 - anchors.leftMargin: 10 + } + TextArea { + id: dumpData + anchors.top: contractData.bottom + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + height: 300 } } property var transactionModel: ListModel { @@ -248,6 +255,7 @@ Rectangle { } } txView.forceActiveFocus() + dumpData.text = bl.raw; } } } diff --git a/cmd/mist/assets/qml/views/miner.qml b/cmd/mist/assets/qml/views/miner.qml index e162d60a4..2d59bb3a4 100644 --- a/cmd/mist/assets/qml/views/miner.qml +++ b/cmd/mist/assets/qml/views/miner.qml @@ -119,14 +119,12 @@ Rectangle { } } Component.onCompleted: { - /* interface test stuff // XXX Temp. replace with above eventually var tmpItems = ["JEVCoin", "Some coin", "Other coin", "Etc coin"]; var address = "e6716f9544a56c530d868e4bfbacb172315bdead"; for (var i = 0; i < tmpItems.length; i++) { mergedMiningModel.append({checked: false, name: tmpItems[i], address: address, id: 0, itemId: i}); } - */ } } } diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index 295011244..7e867395e 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -250,17 +250,6 @@ func (gui *Gui) setInitialChainManager() { blk := gui.eth.ChainManager().GetBlock(sBlk) for ; blk != nil; blk = gui.eth.ChainManager().GetBlock(sBlk) { sBlk = blk.PrevHash - addr := gui.address() - - // Loop through all transactions to see if we missed any while being offline - for _, tx := range blk.Transactions() { - if bytes.Compare(tx.Sender(), addr) == 0 || bytes.Compare(tx.Recipient, addr) == 0 { - if ok, _ := gui.txDb.Get(tx.Hash()); ok == nil { - gui.txDb.Put(tx.Hash(), tx.RlpEncode()) - } - - } - } gui.processBlock(blk, true) } @@ -404,7 +393,7 @@ func (gui *Gui) update() { gui.loadAddressBook() gui.loadMergedMiningOptions() gui.setPeerInfo() - gui.readPreviousTransactions() + //gui.readPreviousTransactions() }() for _, plugin := range gui.plugins { diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go index bdf551325..4e480144f 100644 --- a/cmd/mist/ui_lib.go +++ b/cmd/mist/ui_lib.go @@ -229,7 +229,11 @@ func (self *UiLib) NewFilter(object map[string]interface{}) (id int) { func (self *UiLib) NewFilterString(typ string) (id int) { filter := chain.NewFilter(self.eth) filter.BlockCallback = func(block *chain.Block) { - self.win.Root().Call("invokeFilterCallback", "{}", id) + if self.win != nil && self.win.Root() != nil { + self.win.Root().Call("invokeFilterCallback", "{}", id) + } else { + fmt.Println("QML is lagging") + } } id = self.eth.InstallFilter(filter) return id |