File tree Expand file tree Collapse file tree
forester/src/processor/v2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -407,22 +407,10 @@ impl<R: Rpc> TxSender<R> {
407407 } ) ;
408408 }
409409
410- // Use biased select to ensure the 1-second sleep branch is checked first.
411- // This guarantees periodic re-evaluation of sender eligibility even when
412- // proof_rx.recv() would otherwise block indefinitely waiting for proofs.
413- // Near epoch boundaries, this prevents getting stuck waiting on proofs
414- // when the forester's eligibility window is about to end.
415- let result = tokio:: select! {
416- biased;
417- _ = tokio:: time:: sleep( Duration :: from_secs( 1 ) ) => {
418- continue ;
419- }
420- result = proof_rx. recv( ) => {
421- match result {
422- Some ( r) => r,
423- None => break ,
424- }
425- }
410+ let result = match tokio:: time:: timeout ( Duration :: from_secs ( 1 ) , proof_rx. recv ( ) ) . await {
411+ Ok ( Some ( r) ) => r,
412+ Ok ( None ) => break ,
413+ Err ( _) => continue ,
426414 } ;
427415
428416 let current_slot = self . context . slot_tracker . estimated_current_slot ( ) ;
You can’t perform that action at this time.
0 commit comments