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
2eed46da
Unverified
Commit
2eed46da
authored
Mar 07, 2019
by
Péter Szilágyi
Committed by
GitHub
Mar 07, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #19232 from karalabe/dl-fix-local-drop-sync
eth/downloader: fix nil droppeer in state sync
parents
2fa9e99f
1612267a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
statesync.go
eth/downloader/statesync.go
+7
-1
No files found.
eth/downloader/statesync.go
View file @
2eed46da
...
@@ -310,8 +310,14 @@ func (s *stateSync) loop() (err error) {
...
@@ -310,8 +310,14 @@ func (s *stateSync) loop() (err error) {
// 2 items are the minimum requested, if even that times out, we've no use of
// 2 items are the minimum requested, if even that times out, we've no use of
// this peer at the moment.
// this peer at the moment.
log
.
Warn
(
"Stalling state sync, dropping peer"
,
"peer"
,
req
.
peer
.
id
)
log
.
Warn
(
"Stalling state sync, dropping peer"
,
"peer"
,
req
.
peer
.
id
)
if
s
.
d
.
dropPeer
==
nil
{
// The dropPeer method is nil when `--copydb` is used for a local copy.
// Timeouts can occur if e.g. compaction hits at the wrong time, and can be ignored
req
.
peer
.
log
.
Warn
(
"Downloader wants to drop peer, but peerdrop-function is not set"
,
"peer"
,
req
.
peer
.
id
)
}
else
{
s
.
d
.
dropPeer
(
req
.
peer
.
id
)
s
.
d
.
dropPeer
(
req
.
peer
.
id
)
}
}
}
// Process all the received blobs and check for stale delivery
// Process all the received blobs and check for stale delivery
delivered
,
err
:=
s
.
process
(
req
)
delivered
,
err
:=
s
.
process
(
req
)
if
err
!=
nil
{
if
err
!=
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