Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
e68c502f
Commit
e68c502f
authored
Aug 25, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display block size
parent
997e9219
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
chain.qml
ethereal/assets/qml/views/chain.qml
+3
-4
gui.go
ethereal/gui.go
+3
-3
No files found.
ethereal/assets/qml/views/chain.qml
View file @
e68c502f
...
...
@@ -10,7 +10,6 @@ Rectangle {
id
:
root
property
var
title
:
"Network"
property
var
iconSource
:
"../net.png"
property
var
secondary
:
"Hi"
property
var
menuItem
objectName
:
"chainView"
...
...
@@ -110,9 +109,9 @@ Rectangle {
}
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
{
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;
...
...
@@ -137,7 +136,7 @@ Rectangle {
anchors.top
:
parent
.
top
anchors.left
:
parent
.
left
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>Coinbase:</b> <'
+
name
+
'> '
+
coinbase
;
color
:
"#F2F2F2"
}
Text
{
text
:
'<b>Block found at:</b> '
+
prettyTime
;
color
:
"#F2F2F2"
}
...
...
ethereal/gui.go
View file @
e68c502f
...
...
@@ -279,7 +279,7 @@ func (gui *Gui) insertTransaction(window string, tx *ethchain.Transaction) {
ptx
.
Address
=
r
if
window
==
"post"
{
gui
.
getObjectByName
(
"transactionView"
)
.
Call
(
"addTx"
,
ptx
,
inout
)
//
gui.getObjectByName("transactionView").Call("addTx", ptx, inout)
}
else
{
gui
.
getObjectByName
(
"pendingTxView"
)
.
Call
(
"addTx"
,
ptx
,
inout
)
}
...
...
@@ -393,12 +393,12 @@ func (gui *Gui) update() {
if
bytes
.
Compare
(
tx
.
Sender
(),
gui
.
address
())
==
0
{
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
())
}
else
if
bytes
.
Compare
(
tx
.
Recipient
,
gui
.
address
())
==
0
{
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
())
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment