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
cbbc54c4
Unverified
Commit
cbbc54c4
authored
Aug 10, 2020
by
Péter Szilágyi
Committed by
GitHub
Aug 10, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #21433 from holiman/statsync_exiter
eth/downloader: allow all timers to exit
parents
48b484c5
7cee2509
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
7 deletions
+1
-7
statesync.go
eth/downloader/statesync.go
+1
-7
No files found.
eth/downloader/statesync.go
View file @
cbbc54c4
...
...
@@ -200,12 +200,7 @@ func (d *Downloader) runStateSync(s *stateSync) *stateSync {
}
// Start a timer to notify the sync loop if the peer stalled.
req
.
timer
=
time
.
AfterFunc
(
req
.
timeout
,
func
()
{
select
{
case
timeout
<-
req
:
case
<-
s
.
done
:
// Prevent leaking of timer goroutines in the unlikely case where a
// timer is fired just before exiting runStateSync.
}
timeout
<-
req
})
active
[
req
.
peer
.
id
]
=
req
}
...
...
@@ -217,7 +212,6 @@ func (d *Downloader) runStateSync(s *stateSync) *stateSync {
// are marked as idle and de facto _are_ idle.
func
(
d
*
Downloader
)
spindownStateSync
(
active
map
[
string
]
*
stateReq
,
finished
[]
*
stateReq
,
timeout
chan
*
stateReq
,
peerDrop
chan
*
peerConnection
)
{
log
.
Trace
(
"State sync spinning down"
,
"active"
,
len
(
active
),
"finished"
,
len
(
finished
))
for
len
(
active
)
>
0
{
var
(
req
*
stateReq
...
...
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