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
69c1f2c2
Unverified
Commit
69c1f2c2
authored
Feb 12, 2018
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: force import known but rolled back blocks
parent
52ad848b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
blockchain.go
core/blockchain.go
+6
-2
No files found.
core/blockchain.go
View file @
69c1f2c2
...
@@ -1070,8 +1070,12 @@ func (bc *BlockChain) insertChain(chain types.Blocks) (int, []interface{}, []*ty
...
@@ -1070,8 +1070,12 @@ func (bc *BlockChain) insertChain(chain types.Blocks) (int, []interface{}, []*ty
}
}
switch
{
switch
{
case
err
==
ErrKnownBlock
:
case
err
==
ErrKnownBlock
:
stats
.
ignored
++
// Block and state both already known. However if the current block is below
continue
// this number we did a rollback and we should reimport it nonetheless.
if
bc
.
CurrentBlock
()
.
NumberU64
()
>=
block
.
NumberU64
()
{
stats
.
ignored
++
continue
}
case
err
==
consensus
.
ErrFutureBlock
:
case
err
==
consensus
.
ErrFutureBlock
:
// Allow up to MaxFuture second in the future blocks. If this limit is exceeded
// Allow up to MaxFuture second in the future blocks. If this limit is exceeded
...
...
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