Skip to content

Commit 1fdced5

Browse files
committed
eth/fetcher: Fix race condition in tests
The `tester.fetcher` is already started in `newTester`
1 parent 8bf3abc commit 1fdced5

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

eth/fetcher/block_fetcher_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,8 +1059,6 @@ func testWitnessFetching(t *testing.T, light bool) {
10591059
bodyFetcher := tester.makeBodyFetcher("valid", blocks, 0)
10601060
witnessFetcher := tester.makeWitnessFetcher("valid", blocks, 0)
10611061

1062-
// Start the fetcher's activity loop
1063-
tester.fetcher.Start()
10641062
defer tester.fetcher.Stop()
10651063

10661064
// Announce the blocks one by one
@@ -1106,8 +1104,6 @@ func testSequentialAnnouncementsWithDrift(t *testing.T, light bool) {
11061104
bodyFetcher := tester.makeBodyFetcher("valid", blocks, 0)
11071105
witnessFetcher := tester.makeWitnessFetcher("valid", blocks, 0)
11081106

1109-
// Start the fetcher's activity loop
1110-
tester.fetcher.Start()
11111107
defer tester.fetcher.Stop()
11121108

11131109
// Announce the blocks one by one with time drift
@@ -1153,8 +1149,6 @@ func testSequentialAnnouncementsWithTimeout(t *testing.T, light bool) {
11531149
bodyFetcher := tester.makeBodyFetcher("valid", blocks, 0)
11541150
witnessFetcher := tester.makeWitnessFetcher("valid", blocks, 0)
11551151

1156-
// Start the fetcher's activity loop
1157-
tester.fetcher.Start()
11581152
defer tester.fetcher.Stop()
11591153

11601154
// Announce the blocks one by one with timeout

0 commit comments

Comments
 (0)