Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
whqwjb
go-ethereum
提交
fcbf99a3
G
go-ethereum
项目概览
whqwjb
/
go-ethereum
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
go-ethereum
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fcbf99a3
编写于
5月 30, 2014
作者:
O
obscuren
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor GUI updates
* IceCream => IceCREAM * Added coin base to block info
上级
40d72ff4
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
49 addition
and
36 deletion
+49
-36
ethereal/assets/debugger/debugger.qml
ethereal/assets/debugger/debugger.qml
+1
-1
ethereal/assets/qml/wallet.qml
ethereal/assets/qml/wallet.qml
+30
-35
ethereal/ui/gui.go
ethereal/ui/gui.go
+18
-0
未找到文件。
ethereal/assets/debugger/debugger.qml
浏览文件 @
fcbf99a3
...
...
@@ -8,7 +8,7 @@ import Ethereum 1.0
ApplicationWindow
{
visible
:
false
title
:
"
IceC
ream
"
title
:
"
IceC
REAM
"
minimumWidth
:
1280
minimumHeight
:
900
width
:
1290
...
...
ethereal/assets/qml/wallet.qml
浏览文件 @
fcbf99a3
...
...
@@ -245,10 +245,25 @@ ApplicationWindow {
width
:
500
}
property
var
addressModel
:
ListModel
{
id
:
addressModel
}
TableView
{
id
:
addressView
width
:
parent
.
width
height
:
200
anchors.bottom
:
logView
.
top
TableViewColumn
{
role
:
"
name
"
;
title
:
"
name
"
}
TableViewColumn
{
role
:
"
address
"
;
title
:
"
address
"
;
width
:
300
}
model
:
addressModel
}
property
var
logModel
:
ListModel
{
id
:
logModel
}
TableView
{
id
:
logView
width
:
parent
.
width
...
...
@@ -342,13 +357,13 @@ ApplicationWindow {
visible
:
false
property
var
block
width
:
root
.
width
height
:
24
0
height
:
30
0
Component
{
id
:
blockDetailsDelegate
Rectangle
{
color
:
"
#252525
"
width
:
popup
.
width
height
:
20
0
height
:
15
0
Column
{
anchors.leftMargin
:
10
anchors.topMargin
:
5
...
...
@@ -357,6 +372,7 @@ ApplicationWindow {
Text
{
text
:
'
<h3>Block details</h3>
'
;
color
:
"
#F2F2F2
"
}
Text
{
text
:
'
<b>Block number:</b>
'
+
number
;
color
:
"
#F2F2F2
"
}
Text
{
text
:
'
<b>Hash:</b>
'
+
hash
;
color
:
"
#F2F2F2
"
}
Text
{
text
:
'
<b>Coinbase:</b>
'
+
coinbase
;
color
:
"
#F2F2F2
"
}
Text
{
text
:
'
<b>Block found at:</b>
'
+
prettyTime
;
color
:
"
#F2F2F2
"
}
}
}
...
...
@@ -365,7 +381,7 @@ ApplicationWindow {
model
:
singleBlock
delegate
:
blockDetailsDelegate
anchors.top
:
parent
.
top
height
:
7
0
height
:
10
0
anchors.leftMargin
:
20
id
:
listViewThing
Layout.maximumHeight
:
40
...
...
@@ -390,7 +406,7 @@ ApplicationWindow {
if
(
tx
.
data
)
{
popup
.
showContractData
(
tx
)
}
else
{
popup
.
height
=
23
0
popup
.
height
=
44
0
}
}
}
...
...
@@ -404,7 +420,7 @@ ApplicationWindow {
contractLabel
.
text
=
"
<h4> Transaction ran contract
"
+
tx
.
address
+
"
</h4>
"
contractData
.
text
=
tx
.
rawData
}
popup
.
height
=
40
0
popup
.
height
=
54
0
}
Rectangle
{
...
...
@@ -456,7 +472,7 @@ ApplicationWindow {
}
function
setDetails
(
block
){
singleBlock
.
set
(
0
,
block
)
popup
.
height
=
23
0
popup
.
height
=
30
0
transactionModel
.
clear
()
if
(
block
.
txs
!=
undefined
){
for
(
var
i
=
0
;
i
<
block
.
txs
.
count
;
++
i
)
{
...
...
@@ -620,36 +636,15 @@ ApplicationWindow {
}
}
function
setAsm
(
asm
)
{
asmModel
.
append
({
asm
:
asm
})
}
function
setInstruction
(
num
)
{
asmTableView
.
selection
.
clear
()
asmTableView
.
selection
.
select
(
num
-
1
)
}
function
clearAsm
()
{
asmModel
.
clear
()
}
function
setMem
(
mem
)
{
memModel
.
append
({
num
:
mem
.
num
,
value
:
mem
.
value
})
}
function
clearMem
(){
memModel
.
clear
()
}
function
setStack
(
stack
)
{
stackModel
.
append
({
value
:
stack
})
}
function
addDebugMessage
(
message
){
console
.
log
(
"
WOOP:
"
)
debuggerLog
.
append
({
value
:
message
})
}
function
clearStack
()
{
stackModel
.
clear
()
function
addAddress
(
address
)
{
addressModel
.
append
({
name
:
address
.
name
,
address
:
address
.
address
})
}
function
clearAddress
()
{
addressModel
.
clear
()
}
function
loadPlugin
(
name
)
{
...
...
@@ -683,9 +678,9 @@ ApplicationWindow {
}
if
(
initial
){
blockModel
.
append
({
number
:
block
.
number
,
hash
:
block
.
hash
,
txs
:
txs
,
txAmount
:
amount
,
time
:
block
.
time
,
prettyTime
:
convertToPretty
(
block
.
time
)})
blockModel
.
append
({
number
:
block
.
number
,
coinbase
:
block
.
coinbase
,
hash
:
block
.
hash
,
txs
:
txs
,
txAmount
:
amount
,
time
:
block
.
time
,
prettyTime
:
convertToPretty
(
block
.
time
)})
}
else
{
blockModel
.
insert
(
0
,
{
number
:
block
.
number
,
hash
:
block
.
hash
,
txs
:
txs
,
txAmount
:
amount
,
time
:
block
.
time
,
prettyTime
:
convertToPretty
(
block
.
time
)})
blockModel
.
insert
(
0
,
{
number
:
block
.
number
,
coinbase
:
block
.
coinbase
,
hash
:
block
.
hash
,
txs
:
txs
,
txAmount
:
amount
,
time
:
block
.
time
,
prettyTime
:
convertToPretty
(
block
.
time
)})
}
}
...
...
ethereal/ui/gui.go
浏览文件 @
fcbf99a3
...
...
@@ -110,6 +110,7 @@ func (gui *Gui) showWallet(context *qml.Context) (*qml.Window, error) {
win
:=
gui
.
createWindow
(
component
)
go
gui
.
setInitialBlockChain
()
go
gui
.
loadAddressBook
()
go
gui
.
readPreviousTransactions
()
go
gui
.
update
()
...
...
@@ -147,6 +148,19 @@ func (gui *Gui) setInitialBlockChain() {
}
}
type
address
struct
{
Name
,
Address
string
}
var
namereg
=
ethutil
.
FromHex
(
"bb5f186604d057c1c5240ca2ae0f6430138ac010"
)
func
(
gui
*
Gui
)
loadAddressBook
()
{
gui
.
win
.
Root
()
.
Call
(
"clearAddress"
)
gui
.
eth
.
StateManager
()
.
CurrentState
()
.
GetStateObject
(
namereg
)
.
State
()
.
EachStorage
(
func
(
name
string
,
value
*
ethutil
.
Value
)
{
gui
.
win
.
Root
()
.
Call
(
"addAddress"
,
struct
{
Name
,
Address
string
}{
name
,
ethutil
.
Hex
(
value
.
Bytes
())})
})
}
func
(
gui
*
Gui
)
readPreviousTransactions
()
{
it
:=
gui
.
txDb
.
Db
()
.
NewIterator
(
nil
,
nil
)
for
it
.
Next
()
{
...
...
@@ -191,10 +205,12 @@ func (gui *Gui) update() {
blockChan
:=
make
(
chan
ethutil
.
React
,
1
)
txChan
:=
make
(
chan
ethutil
.
React
,
1
)
objectChan
:=
make
(
chan
ethutil
.
React
,
1
)
reactor
.
Subscribe
(
"newBlock"
,
blockChan
)
reactor
.
Subscribe
(
"newTx:pre"
,
txChan
)
reactor
.
Subscribe
(
"newTx:post"
,
txChan
)
reactor
.
Subscribe
(
"object:"
+
string
(
namereg
),
objectChan
)
state
:=
gui
.
eth
.
StateManager
()
.
TransState
()
...
...
@@ -241,6 +257,8 @@ func (gui *Gui) update() {
state
.
UpdateStateObject
(
object
)
}
case
<-
objectChan
:
gui
.
loadAddressBook
()
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录