Display block size
This commit is contained in:
parent
997e92191d
commit
e68c502f7a
@ -10,7 +10,6 @@ Rectangle {
|
|||||||
id: root
|
id: root
|
||||||
property var title: "Network"
|
property var title: "Network"
|
||||||
property var iconSource: "../net.png"
|
property var iconSource: "../net.png"
|
||||||
property var secondary: "Hi"
|
|
||||||
property var menuItem
|
property var menuItem
|
||||||
|
|
||||||
objectName: "chainView"
|
objectName: "chainView"
|
||||||
@ -110,9 +109,9 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(initial){
|
if(initial){
|
||||||
blockModel.append({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({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 {
|
} else {
|
||||||
blockModel.insert(0, {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, {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)})
|
||||||
}
|
}
|
||||||
|
|
||||||
//root.secondary.text = "#" + block.number;
|
//root.secondary.text = "#" + block.number;
|
||||||
@ -137,7 +136,7 @@ Rectangle {
|
|||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
Text { text: '<h3>Block details</h3>'; color: "#F2F2F2"}
|
Text { text: '<h3>Block details</h3>'; color: "#F2F2F2"}
|
||||||
Text { text: '<b>Block number:</b> ' + number; color: "#F2F2F2"}
|
Text { text: '<b>Block number:</b> ' + number + " (Size: " + size + ")"; color: "#F2F2F2"}
|
||||||
Text { text: '<b>Hash:</b> ' + hash; color: "#F2F2F2"}
|
Text { text: '<b>Hash:</b> ' + hash; color: "#F2F2F2"}
|
||||||
Text { text: '<b>Coinbase:</b> <' + name + '> ' + coinbase; color: "#F2F2F2"}
|
Text { text: '<b>Coinbase:</b> <' + name + '> ' + coinbase; color: "#F2F2F2"}
|
||||||
Text { text: '<b>Block found at:</b> ' + prettyTime; color: "#F2F2F2"}
|
Text { text: '<b>Block found at:</b> ' + prettyTime; color: "#F2F2F2"}
|
||||||
|
@ -279,7 +279,7 @@ func (gui *Gui) insertTransaction(window string, tx *ethchain.Transaction) {
|
|||||||
ptx.Address = r
|
ptx.Address = r
|
||||||
|
|
||||||
if window == "post" {
|
if window == "post" {
|
||||||
gui.getObjectByName("transactionView").Call("addTx", ptx, inout)
|
//gui.getObjectByName("transactionView").Call("addTx", ptx, inout)
|
||||||
} else {
|
} else {
|
||||||
gui.getObjectByName("pendingTxView").Call("addTx", ptx, inout)
|
gui.getObjectByName("pendingTxView").Call("addTx", ptx, inout)
|
||||||
}
|
}
|
||||||
@ -393,12 +393,12 @@ func (gui *Gui) update() {
|
|||||||
if bytes.Compare(tx.Sender(), gui.address()) == 0 {
|
if bytes.Compare(tx.Sender(), gui.address()) == 0 {
|
||||||
object.SubAmount(tx.Value)
|
object.SubAmount(tx.Value)
|
||||||
|
|
||||||
gui.getObjectByName("transactionView").Call("addTx", ethpipe.NewJSTx(tx), "send")
|
//gui.getObjectByName("transactionView").Call("addTx", ethpipe.NewJSTx(tx), "send")
|
||||||
gui.txDb.Put(tx.Hash(), tx.RlpEncode())
|
gui.txDb.Put(tx.Hash(), tx.RlpEncode())
|
||||||
} else if bytes.Compare(tx.Recipient, gui.address()) == 0 {
|
} else if bytes.Compare(tx.Recipient, gui.address()) == 0 {
|
||||||
object.AddAmount(tx.Value)
|
object.AddAmount(tx.Value)
|
||||||
|
|
||||||
gui.getObjectByName("transactionView").Call("addTx", ethpipe.NewJSTx(tx), "recv")
|
//gui.getObjectByName("transactionView").Call("addTx", ethpipe.NewJSTx(tx), "recv")
|
||||||
gui.txDb.Put(tx.Hash(), tx.RlpEncode())
|
gui.txDb.Put(tx.Hash(), tx.RlpEncode())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user