@@ -138,7 +138,7 @@ func TestSendWants(t *testing.T) {
138
138
bpm := bsbpm .New ()
139
139
onSend := func (peer.ID , []cid.Cid , []cid.Cid ) {}
140
140
onPeersExhausted := func ([]cid.Cid ) {}
141
- spm := newSessionWantSender (context . Background (), sid , pm , fpm , bpm , onSend , onPeersExhausted )
141
+ spm := newSessionWantSender (sid , pm , fpm , bpm , onSend , onPeersExhausted )
142
142
143
143
go spm .Run ()
144
144
@@ -176,7 +176,7 @@ func TestSendsWantBlockToOnePeerOnly(t *testing.T) {
176
176
bpm := bsbpm .New ()
177
177
onSend := func (peer.ID , []cid.Cid , []cid.Cid ) {}
178
178
onPeersExhausted := func ([]cid.Cid ) {}
179
- spm := newSessionWantSender (context . Background (), sid , pm , fpm , bpm , onSend , onPeersExhausted )
179
+ spm := newSessionWantSender (sid , pm , fpm , bpm , onSend , onPeersExhausted )
180
180
181
181
go spm .Run ()
182
182
@@ -234,7 +234,7 @@ func TestReceiveBlock(t *testing.T) {
234
234
bpm := bsbpm .New ()
235
235
onSend := func (peer.ID , []cid.Cid , []cid.Cid ) {}
236
236
onPeersExhausted := func ([]cid.Cid ) {}
237
- spm := newSessionWantSender (context . Background (), sid , pm , fpm , bpm , onSend , onPeersExhausted )
237
+ spm := newSessionWantSender (sid , pm , fpm , bpm , onSend , onPeersExhausted )
238
238
239
239
go spm .Run ()
240
240
@@ -294,7 +294,7 @@ func TestPeerUnavailable(t *testing.T) {
294
294
bpm := bsbpm .New ()
295
295
onSend := func (peer.ID , []cid.Cid , []cid.Cid ) {}
296
296
onPeersExhausted := func ([]cid.Cid ) {}
297
- spm := newSessionWantSender (context . Background (), sid , pm , fpm , bpm , onSend , onPeersExhausted )
297
+ spm := newSessionWantSender (sid , pm , fpm , bpm , onSend , onPeersExhausted )
298
298
299
299
go spm .Run ()
300
300
@@ -360,7 +360,7 @@ func TestPeersExhausted(t *testing.T) {
360
360
onSend := func (peer.ID , []cid.Cid , []cid.Cid ) {}
361
361
362
362
ep := exhaustedPeers {}
363
- spm := newSessionWantSender (context . Background (), sid , pm , fpm , bpm , onSend , ep .onPeersExhausted )
363
+ spm := newSessionWantSender (sid , pm , fpm , bpm , onSend , ep .onPeersExhausted )
364
364
365
365
go spm .Run ()
366
366
@@ -436,7 +436,7 @@ func TestPeersExhaustedLastWaitingPeerUnavailable(t *testing.T) {
436
436
onSend := func (peer.ID , []cid.Cid , []cid.Cid ) {}
437
437
438
438
ep := exhaustedPeers {}
439
- spm := newSessionWantSender (context . Background (), sid , pm , fpm , bpm , onSend , ep .onPeersExhausted )
439
+ spm := newSessionWantSender (sid , pm , fpm , bpm , onSend , ep .onPeersExhausted )
440
440
441
441
go spm .Run ()
442
442
@@ -484,7 +484,7 @@ func TestPeersExhaustedAllPeersUnavailable(t *testing.T) {
484
484
onSend := func (peer.ID , []cid.Cid , []cid.Cid ) {}
485
485
486
486
ep := exhaustedPeers {}
487
- spm := newSessionWantSender (context . Background (), sid , pm , fpm , bpm , onSend , ep .onPeersExhausted )
487
+ spm := newSessionWantSender (sid , pm , fpm , bpm , onSend , ep .onPeersExhausted )
488
488
489
489
go spm .Run ()
490
490
@@ -522,7 +522,7 @@ func TestConsecutiveDontHaveLimit(t *testing.T) {
522
522
bpm := bsbpm .New ()
523
523
onSend := func (peer.ID , []cid.Cid , []cid.Cid ) {}
524
524
onPeersExhausted := func ([]cid.Cid ) {}
525
- spm := newSessionWantSender (context . Background (), sid , pm , fpm , bpm , onSend , onPeersExhausted )
525
+ spm := newSessionWantSender (sid , pm , fpm , bpm , onSend , onPeersExhausted )
526
526
527
527
go spm .Run ()
528
528
@@ -578,7 +578,7 @@ func TestConsecutiveDontHaveLimitInterrupted(t *testing.T) {
578
578
bpm := bsbpm .New ()
579
579
onSend := func (peer.ID , []cid.Cid , []cid.Cid ) {}
580
580
onPeersExhausted := func ([]cid.Cid ) {}
581
- spm := newSessionWantSender (context . Background (), sid , pm , fpm , bpm , onSend , onPeersExhausted )
581
+ spm := newSessionWantSender (sid , pm , fpm , bpm , onSend , onPeersExhausted )
582
582
583
583
go spm .Run ()
584
584
@@ -633,7 +633,7 @@ func TestConsecutiveDontHaveReinstateAfterRemoval(t *testing.T) {
633
633
bpm := bsbpm .New ()
634
634
onSend := func (peer.ID , []cid.Cid , []cid.Cid ) {}
635
635
onPeersExhausted := func ([]cid.Cid ) {}
636
- spm := newSessionWantSender (context . Background (), sid , pm , fpm , bpm , onSend , onPeersExhausted )
636
+ spm := newSessionWantSender (sid , pm , fpm , bpm , onSend , onPeersExhausted )
637
637
638
638
go spm .Run ()
639
639
@@ -717,7 +717,7 @@ func TestConsecutiveDontHaveDontRemoveIfHasWantedBlock(t *testing.T) {
717
717
bpm := bsbpm .New ()
718
718
onSend := func (peer.ID , []cid.Cid , []cid.Cid ) {}
719
719
onPeersExhausted := func ([]cid.Cid ) {}
720
- spm := newSessionWantSender (context . Background (), sid , pm , fpm , bpm , onSend , onPeersExhausted )
720
+ spm := newSessionWantSender (sid , pm , fpm , bpm , onSend , onPeersExhausted )
721
721
722
722
go spm .Run ()
723
723
0 commit comments