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
5b2e5d18
Commit
5b2e5d18
authored
Jul 13, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed diff output not to prefix hex with 0x
parent
6426f363
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
state.go
ethchain/state.go
+2
-2
state_manager.go
ethchain/state_manager.go
+3
-3
No files found.
ethchain/state.go
View file @
5b2e5d18
...
@@ -212,9 +212,9 @@ func (self *State) Update() {
...
@@ -212,9 +212,9 @@ func (self *State) Update() {
// Debug stuff
// Debug stuff
func
(
self
*
State
)
CreateOutputForDiff
()
{
func
(
self
*
State
)
CreateOutputForDiff
()
{
for
addr
,
stateObject
:=
range
self
.
stateObjects
{
for
addr
,
stateObject
:=
range
self
.
stateObjects
{
fmt
.
Printf
(
"
0x%x 0x%x 0x%x 0x
%x
\n
"
,
addr
,
stateObject
.
state
.
Root
(),
stateObject
.
Amount
.
Bytes
(),
stateObject
.
Nonce
)
fmt
.
Printf
(
"
%x %x %x
%x
\n
"
,
addr
,
stateObject
.
state
.
Root
(),
stateObject
.
Amount
.
Bytes
(),
stateObject
.
Nonce
)
stateObject
.
state
.
EachStorage
(
func
(
addr
string
,
value
*
ethutil
.
Value
)
{
stateObject
.
state
.
EachStorage
(
func
(
addr
string
,
value
*
ethutil
.
Value
)
{
fmt
.
Printf
(
"
0x%x 0x
%x
\n
"
,
addr
,
value
.
Bytes
())
fmt
.
Printf
(
"
%x
%x
\n
"
,
addr
,
value
.
Bytes
())
})
})
}
}
}
}
...
...
ethchain/state_manager.go
View file @
5b2e5d18
...
@@ -151,7 +151,7 @@ done:
...
@@ -151,7 +151,7 @@ done:
receipts
=
append
(
receipts
,
receipt
)
receipts
=
append
(
receipts
,
receipt
)
handled
=
append
(
handled
,
tx
)
handled
=
append
(
handled
,
tx
)
if
ethutil
.
Config
.
Diff
{
if
ethutil
.
Config
.
Diff
&&
ethutil
.
Config
.
DiffType
==
"all"
{
state
.
CreateOutputForDiff
()
state
.
CreateOutputForDiff
()
}
}
}
}
...
@@ -187,8 +187,8 @@ func (sm *StateManager) Process(block *Block, dontReact bool) (err error) {
...
@@ -187,8 +187,8 @@ func (sm *StateManager) Process(block *Block, dontReact bool) (err error) {
// before that.
// before that.
defer
state
.
Reset
()
defer
state
.
Reset
()
if
ethutil
.
Config
.
Diff
{
if
ethutil
.
Config
.
Diff
&&
ethutil
.
Config
.
DiffType
==
"all"
{
fmt
.
Printf
(
"##
0x%x 0x
%x ##
\n
"
,
block
.
Hash
(),
block
.
Number
)
fmt
.
Printf
(
"##
%x
%x ##
\n
"
,
block
.
Hash
(),
block
.
Number
)
}
}
receipts
,
err
:=
sm
.
ApplyDiff
(
state
,
parent
,
block
)
receipts
,
err
:=
sm
.
ApplyDiff
(
state
,
parent
,
block
)
...
...
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