-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The race was discoverable with go test -race ./eth or under 'slow' machine conditions, eg. GOMAXPROCS=1 and/or a 'slower' machine. The race was around the minArtificialFinalityPeers value, which was both - assigned in (during) the tests, and - checked in the nextSyncOp function and the order of those uses was nondeterministic. This patch resolves the issue by moving the adhoc and temporary re-assignment of that package-wide value to the start of the tests, before any go routines for peer handling or sync protocol are fired off. Note that the real-clock timeouts in these tests can still cause spurious test failures under 'slow' conditions (see their 250ms sleeps). Fixes #521 Date: 2023-01-30 13:39:38-08:00 Signed-off-by: meows <[email protected]>
- Loading branch information
Showing
1 changed file
with
43 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters