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
0d733aa0
Commit
0d733aa0
authored
Aug 14, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed validation check from GetMessages
parent
fa881220
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
30 deletions
+2
-30
state_manager.go
ethchain/state_manager.go
+2
-30
No files found.
ethchain/state_manager.go
View file @
0d733aa0
...
...
@@ -406,37 +406,9 @@ func (sm *StateManager) GetMessages(block *Block) (messages []*ethstate.Message,
defer
state
.
Reset
()
if
ethutil
.
Config
.
Diff
&&
ethutil
.
Config
.
DiffType
==
"all"
{
fmt
.
Printf
(
"## %x %x ##
\n
"
,
block
.
Hash
(),
block
.
Number
)
}
receipts
,
err
:=
sm
.
ApplyDiff
(
state
,
parent
,
block
)
if
err
!=
nil
{
return
nil
,
err
}
sm
.
ApplyDiff
(
state
,
parent
,
block
)
txSha
:=
CreateTxSha
(
receipts
)
if
bytes
.
Compare
(
txSha
,
block
.
TxSha
)
!=
0
{
return
nil
,
fmt
.
Errorf
(
"Error validating tx sha. Received %x, got %x"
,
block
.
TxSha
,
txSha
)
}
// Block validation
if
err
=
sm
.
ValidateBlock
(
block
);
err
!=
nil
{
statelogger
.
Errorln
(
"Error validating block:"
,
err
)
return
nil
,
err
}
// I'm not sure, but I don't know if there should be thrown
// any errors at this time.
if
err
=
sm
.
AccumelateRewards
(
state
,
block
);
err
!=
nil
{
statelogger
.
Errorln
(
"Error accumulating reward"
,
err
)
return
nil
,
err
}
if
!
block
.
State
()
.
Cmp
(
state
)
{
err
=
fmt
.
Errorf
(
"Invalid merkle root.
\n
rec: %x
\n
is: %x"
,
block
.
State
()
.
Trie
.
Root
,
state
.
Trie
.
Root
)
return
nil
,
err
}
sm
.
AccumelateRewards
(
state
,
block
)
return
state
.
Manifest
()
.
Messages
,
nil
}
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