Skip to content

Commit 01d9107

Browse files
committed
Add namecoin name if available to block
1 parent ba3fabd commit 01d9107

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

ethereal/assets/qml/wallet.qml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ ApplicationWindow {
472472
Text { text: '<h3>Block details</h3>'; color: "#F2F2F2"}
473473
Text { text: '<b>Block number:</b> ' + number; color: "#F2F2F2"}
474474
Text { text: '<b>Hash:</b> ' + hash; color: "#F2F2F2"}
475-
Text { text: '<b>Coinbase:</b> ' + coinbase; color: "#F2F2F2"}
475+
Text { text: '<b>Coinbase:</b> <' + name + '> ' + coinbase; color: "#F2F2F2"}
476476
Text { text: '<b>Block found at:</b> ' + prettyTime; color: "#F2F2F2"}
477477
Text { text: '<b>Gas used:</b> ' + gasUsed + " / " + gasLimit; color: "#F2F2F2"}
478478
}
@@ -699,9 +699,9 @@ ApplicationWindow {
699699
}
700700

701701
if(initial){
702-
blockModel.append({number: block.number, gasLimit: block.gasLimit, gasUsed: block.gasUsed, coinbase: block.coinbase, hash: block.hash, txs: txs, txAmount: amount, time: block.time, prettyTime: convertToPretty(block.time)})
702+
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)})
703703
}else{
704-
blockModel.insert(0, {number: block.number, gasLimit: block.gasLimit, gasUsed: block.gasUsed, coinbase: block.coinbase, hash: block.hash, txs: txs, txAmount: amount, time: block.time, prettyTime: convertToPretty(block.time)})
704+
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)})
705705
}
706706
}
707707

ethereal/gui.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,11 @@ func (gui *Gui) readPreviousTransactions() {
243243
}
244244

245245
func (gui *Gui) processBlock(block *ethchain.Block, initial bool) {
246-
gui.win.Root().Call("addBlock", ethpub.NewPBlock(block), initial)
246+
name := ethpub.FindNameInNameReg(gui.eth.StateManager(), block.Coinbase)
247+
b := ethpub.NewPBlock(block)
248+
b.Name = name
249+
250+
gui.win.Root().Call("addBlock", b, initial)
247251
}
248252

249253
func (gui *Gui) setWalletValue(amount, unconfirmedFunds *big.Int) {

0 commit comments

Comments
 (0)