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
29611284
Commit
29611284
authored
Dec 04, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved block validation as first step
parent
008e91db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
block_manager.go
core/block_manager.go
+3
-7
peer.go
peer.go
+1
-1
No files found.
core/block_manager.go
View file @
29611284
...
@@ -224,8 +224,9 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I
...
@@ -224,8 +224,9 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I
// before that.
// before that.
defer
state
.
Reset
()
defer
state
.
Reset
()
if
ethutil
.
Config
.
Diff
&&
ethutil
.
Config
.
DiffType
==
"all"
{
// Block validation
fmt
.
Printf
(
"## %x %x ##
\n
"
,
block
.
Hash
(),
block
.
Number
)
if
err
=
sm
.
ValidateBlock
(
block
,
parent
);
err
!=
nil
{
return
}
}
_
,
err
=
sm
.
TransitionState
(
state
,
parent
,
block
)
_
,
err
=
sm
.
TransitionState
(
state
,
parent
,
block
)
...
@@ -247,11 +248,6 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I
...
@@ -247,11 +248,6 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I
}
}
*/
*/
// Block validation
if
err
=
sm
.
ValidateBlock
(
block
,
parent
);
err
!=
nil
{
return
}
if
err
=
sm
.
AccumelateRewards
(
state
,
block
,
parent
);
err
!=
nil
{
if
err
=
sm
.
AccumelateRewards
(
state
,
block
,
parent
);
err
!=
nil
{
return
return
}
}
...
...
peer.go
View file @
29611284
...
@@ -24,7 +24,7 @@ const (
...
@@ -24,7 +24,7 @@ const (
// The size of the output buffer for writing messages
// The size of the output buffer for writing messages
outputBufferSize
=
50
outputBufferSize
=
50
// Current protocol version
// Current protocol version
ProtocolVersion
=
4
6
ProtocolVersion
=
4
7
// Current P2P version
// Current P2P version
P2PVersion
=
2
P2PVersion
=
2
// Ethereum network version
// Ethereum network version
...
...
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