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
686f7438
Commit
686f7438
authored
Jan 09, 2023
by
Gary Rong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth/downloader: fix unexpected skeleton header deletion
parent
21897730
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
skeleton.go
eth/downloader/skeleton.go
+8
-2
No files found.
eth/downloader/skeleton.go
View file @
686f7438
...
...
@@ -977,8 +977,14 @@ func (s *skeleton) processResponse(res *headerResponse) (linked bool, merged boo
// the expected new sync cycle after some propagated blocks. Log
// it for debugging purposes, explicitly clean and don't escalate.
case
subchains
==
2
&&
s
.
progress
.
Subchains
[
1
]
.
Head
==
s
.
progress
.
Subchains
[
1
]
.
Tail
:
log
.
Debug
(
"Cleaning previous beacon sync state"
,
"head"
,
s
.
progress
.
Subchains
[
1
]
.
Head
)
rawdb
.
DeleteSkeletonHeader
(
batch
,
s
.
progress
.
Subchains
[
1
]
.
Head
)
// Remove the leftover skeleton header associated with old
// skeleton chain only if it's not covered by the current
// skeleton range.
if
s
.
progress
.
Subchains
[
1
]
.
Head
<
s
.
progress
.
Subchains
[
0
]
.
Tail
{
log
.
Debug
(
"Cleaning previous beacon sync state"
,
"head"
,
s
.
progress
.
Subchains
[
1
]
.
Head
)
rawdb
.
DeleteSkeletonHeader
(
batch
,
s
.
progress
.
Subchains
[
1
]
.
Head
)
}
// Drop the leftover skeleton chain since it's stale.
s
.
progress
.
Subchains
=
s
.
progress
.
Subchains
[
:
1
]
// If we have more than one header or more than one leftover chain,
...
...
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