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
e2e3fa3d
Commit
e2e3fa3d
authored
Dec 23, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated Mist to use new blocks
parent
9e5257b8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
gui.go
cmd/mist/gui.go
+4
-4
html_container.go
cmd/mist/html_container.go
+1
-1
qml_container.go
cmd/mist/qml_container.go
+1
-1
No files found.
cmd/mist/gui.go
View file @
e2e3fa3d
...
...
@@ -221,7 +221,7 @@ func (gui *Gui) setInitialChain(ancientBlocks bool) {
sBlk
:=
gui
.
eth
.
ChainManager
()
.
LastBlockHash
()
blk
:=
gui
.
eth
.
ChainManager
()
.
GetBlock
(
sBlk
)
for
;
blk
!=
nil
;
blk
=
gui
.
eth
.
ChainManager
()
.
GetBlock
(
sBlk
)
{
sBlk
=
blk
.
P
revHash
sBlk
=
blk
.
P
arentHash
()
gui
.
processBlock
(
blk
,
true
)
}
...
...
@@ -322,7 +322,7 @@ func (gui *Gui) readPreviousTransactions() {
}
func
(
gui
*
Gui
)
processBlock
(
block
*
types
.
Block
,
initial
bool
)
{
name
:=
strings
.
Trim
(
gui
.
pipe
.
World
()
.
Config
()
.
Get
(
"NameReg"
)
.
Storage
(
block
.
Coinbase
)
.
Str
(),
"
\x00
"
)
name
:=
strings
.
Trim
(
gui
.
pipe
.
World
()
.
Config
()
.
Get
(
"NameReg"
)
.
Storage
(
block
.
Coinbase
()
)
.
Str
(),
"
\x00
"
)
b
:=
xeth
.
NewJSBlock
(
block
)
b
.
Name
=
name
...
...
@@ -400,7 +400,7 @@ func (gui *Gui) update() {
switch
ev
:=
ev
.
(
type
)
{
case
core
.
NewBlockEvent
:
gui
.
processBlock
(
ev
.
Block
,
false
)
if
bytes
.
Compare
(
ev
.
Block
.
Coinbase
,
gui
.
address
())
==
0
{
if
bytes
.
Compare
(
ev
.
Block
.
Coinbase
()
,
gui
.
address
())
==
0
{
gui
.
setWalletValue
(
gui
.
eth
.
ChainManager
()
.
State
()
.
GetBalance
(
gui
.
address
()),
nil
)
}
...
...
@@ -438,7 +438,7 @@ func (gui *Gui) update() {
case
<-
peerUpdateTicker
.
C
:
gui
.
setPeerInfo
()
case
<-
generalUpdateTicker
.
C
:
statusText
:=
"#"
+
gui
.
eth
.
ChainManager
()
.
CurrentBlock
()
.
Number
.
String
()
statusText
:=
"#"
+
gui
.
eth
.
ChainManager
()
.
CurrentBlock
()
.
Number
()
.
String
()
lastBlockLabel
.
Set
(
"text"
,
statusText
)
miningLabel
.
Set
(
"text"
,
"Mining @ "
+
strconv
.
FormatInt
(
gui
.
uiLib
.
miner
.
GetPow
()
.
GetHashrate
(),
10
)
+
"Khash"
)
...
...
cmd/mist/html_container.go
View file @
e2e3fa3d
...
...
@@ -139,7 +139,7 @@ func (app *HtmlApplication) Window() *qml.Window {
}
func
(
app
*
HtmlApplication
)
NewBlock
(
block
*
types
.
Block
)
{
b
:=
&
xeth
.
JSBlock
{
Number
:
int
(
block
.
BlockInfo
()
.
Number
),
Hash
:
ethutil
.
Bytes2Hex
(
block
.
Hash
())}
b
:=
&
xeth
.
JSBlock
{
Number
:
int
(
block
.
NumberU64
()
),
Hash
:
ethutil
.
Bytes2Hex
(
block
.
Hash
())}
app
.
webView
.
Call
(
"onNewBlockCb"
,
b
)
}
...
...
cmd/mist/qml_container.go
View file @
e2e3fa3d
...
...
@@ -66,7 +66,7 @@ func (app *QmlApplication) NewWatcher(quitChan chan bool) {
// Events
func
(
app
*
QmlApplication
)
NewBlock
(
block
*
types
.
Block
)
{
pblock
:=
&
xeth
.
JSBlock
{
Number
:
int
(
block
.
BlockInfo
()
.
Number
),
Hash
:
ethutil
.
Bytes2Hex
(
block
.
Hash
())}
pblock
:=
&
xeth
.
JSBlock
{
Number
:
int
(
block
.
NumberU64
()
),
Hash
:
ethutil
.
Bytes2Hex
(
block
.
Hash
())}
app
.
win
.
Call
(
"onNewBlockCb"
,
pblock
)
}
...
...
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