good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
29611284
Commit
29611284
authored
Dec 4, 2014
by
Jeffrey Wilcke
Browse files
Options
Downloads
Patches
Plain Diff
Moved block validation as first step
parent
008e91db
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/block_manager.go
+3
-7
3 additions, 7 deletions
core/block_manager.go
peer.go
+1
-1
1 addition, 1 deletion
peer.go
with
4 additions
and
8 deletions
core/block_manager.go
+
3
−
7
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
}
}
...
...
This diff is collapsed.
Click to expand it.
peer.go
+
1
−
1
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment