miner: fix data race during shutdown (#23435)
This fixes a data race on worker.current by moving the call to StopPrefetcher into the main loop. The commit also contains fixes for two other races in unit tests of unrelated packages.
This commit is contained in:
committed by
GitHub
parent
28d30b51f8
commit
ee120ef865
@ -486,7 +486,6 @@ func TestCheckpointChallenge(t *testing.T) {
|
||||
}
|
||||
|
||||
func testCheckpointChallenge(t *testing.T, syncmode downloader.SyncMode, checkpoint bool, timeout bool, empty bool, match bool, drop bool) {
|
||||
t.Parallel()
|
||||
|
||||
// Reduce the checkpoint handshake challenge timeout
|
||||
defer func(old time.Duration) { syncChallengeTimeout = old }(syncChallengeTimeout)
|
||||
|
Reference in New Issue
Block a user