@@ -571,7 +571,7 @@ pub enum BlockingOrAsync {
571
571
/// queuing specifics.
572
572
pub enum Work < E : EthSpec > {
573
573
GossipAttestation {
574
- attestation : GossipAttestationPackage < E > ,
574
+ attestation : Box < GossipAttestationPackage < E > > ,
575
575
process_individual : Box < dyn FnOnce ( GossipAttestationPackage < E > ) + Send + Sync > ,
576
576
process_batch : Box < dyn FnOnce ( Vec < GossipAttestationPackage < E > > ) + Send + Sync > ,
577
577
} ,
@@ -583,7 +583,7 @@ pub enum Work<E: EthSpec> {
583
583
process_batch : Box < dyn FnOnce ( Vec < GossipAttestationPackage < E > > ) + Send + Sync > ,
584
584
} ,
585
585
GossipAggregate {
586
- aggregate : GossipAggregatePackage < E > ,
586
+ aggregate : Box < GossipAggregatePackage < E > > ,
587
587
process_individual : Box < dyn FnOnce ( GossipAggregatePackage < E > ) + Send + Sync > ,
588
588
process_batch : Box < dyn FnOnce ( Vec < GossipAggregatePackage < E > > ) + Send + Sync > ,
589
589
} ,
@@ -624,8 +624,8 @@ pub enum Work<E: EthSpec> {
624
624
ChainSegment ( AsyncFn ) ,
625
625
ChainSegmentBackfill ( AsyncFn ) ,
626
626
Status ( BlockingFn ) ,
627
- BlocksByRangeRequest ( BlockingFnWithManualSendOnIdle ) ,
628
- BlocksByRootsRequest ( BlockingFnWithManualSendOnIdle ) ,
627
+ BlocksByRangeRequest ( AsyncFn ) ,
628
+ BlocksByRootsRequest ( AsyncFn ) ,
629
629
BlobsByRangeRequest ( BlockingFn ) ,
630
630
BlobsByRootsRequest ( BlockingFn ) ,
631
631
GossipBlsToExecutionChange ( BlockingFn ) ,
@@ -1015,7 +1015,7 @@ impl<E: EthSpec> BeaconProcessor<E> {
1015
1015
process_individual : _,
1016
1016
process_batch,
1017
1017
} => {
1018
- aggregates. push ( aggregate) ;
1018
+ aggregates. push ( * aggregate) ;
1019
1019
if process_batch_opt. is_none ( ) {
1020
1020
process_batch_opt = Some ( process_batch) ;
1021
1021
}
@@ -1075,7 +1075,7 @@ impl<E: EthSpec> BeaconProcessor<E> {
1075
1075
process_individual : _,
1076
1076
process_batch,
1077
1077
} => {
1078
- attestations. push ( attestation) ;
1078
+ attestations. push ( * attestation) ;
1079
1079
if process_batch_opt. is_none ( ) {
1080
1080
process_batch_opt = Some ( process_batch) ;
1081
1081
}
@@ -1445,7 +1445,7 @@ impl<E: EthSpec> BeaconProcessor<E> {
1445
1445
process_individual,
1446
1446
process_batch : _,
1447
1447
} => task_spawner. spawn_blocking ( move || {
1448
- process_individual ( attestation) ;
1448
+ process_individual ( * attestation) ;
1449
1449
} ) ,
1450
1450
Work :: GossipAttestationBatch {
1451
1451
attestations,
@@ -1458,7 +1458,7 @@ impl<E: EthSpec> BeaconProcessor<E> {
1458
1458
process_individual,
1459
1459
process_batch : _,
1460
1460
} => task_spawner. spawn_blocking ( move || {
1461
- process_individual ( aggregate) ;
1461
+ process_individual ( * aggregate) ;
1462
1462
} ) ,
1463
1463
Work :: GossipAggregateBatch {
1464
1464
aggregates,
@@ -1493,7 +1493,7 @@ impl<E: EthSpec> BeaconProcessor<E> {
1493
1493
task_spawner. spawn_blocking ( process_fn)
1494
1494
}
1495
1495
Work :: BlocksByRangeRequest ( work) | Work :: BlocksByRootsRequest ( work) => {
1496
- task_spawner. spawn_blocking_with_manual_send_idle ( work)
1496
+ task_spawner. spawn_async ( work)
1497
1497
}
1498
1498
Work :: ChainSegmentBackfill ( process_fn) => task_spawner. spawn_async ( process_fn) ,
1499
1499
Work :: ApiRequestP0 ( process_fn) | Work :: ApiRequestP1 ( process_fn) => match process_fn {
@@ -1555,23 +1555,6 @@ impl TaskSpawner {
1555
1555
WORKER_TASK_NAME ,
1556
1556
)
1557
1557
}
1558
-
1559
- /// Spawn a blocking task, passing the `SendOnDrop` into the task.
1560
- ///
1561
- /// ## Notes
1562
- ///
1563
- /// Users must ensure the `SendOnDrop` is dropped at the appropriate time!
1564
- pub fn spawn_blocking_with_manual_send_idle < F > ( self , task : F )
1565
- where
1566
- F : FnOnce ( SendOnDrop ) + Send + ' static ,
1567
- {
1568
- self . executor . spawn_blocking (
1569
- || {
1570
- task ( self . send_idle_on_drop ) ;
1571
- } ,
1572
- WORKER_TASK_NAME ,
1573
- )
1574
- }
1575
1558
}
1576
1559
1577
1560
/// This struct will send a message on `self.tx` when it is dropped. An error will be logged on
0 commit comments