File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
aggregation_mode/proof_aggregator/src/backend Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ use alloy::{
1717 rpc:: types:: TransactionReceipt ,
1818} ;
1919use risc0_ethereum_contracts:: encode_seal;
20- use std :: thread :: sleep;
20+ use tokio :: time :: sleep;
2121
2222#[ derive( Debug ) ]
2323pub enum RetryError < E > {
@@ -79,6 +79,9 @@ async fn wait_until_can_submit_aggregated_proof(
7979 // should be considered over a 24h period.
8080 let mut time_elapsed = Duration :: from_secs ( 24 * 3600 ) ;
8181
82+ // Sleep for 3 minutes (15 blocks) before re-evaluating on each iteration
83+ let time_to_sleep = Duration :: from_secs ( 180 ) ;
84+
8285 // Iterate until we can send the proof on-chain
8386 loop {
8487 // Fetch gas price from network
@@ -100,10 +103,8 @@ async fn wait_until_can_submit_aggregated_proof(
100103 info ! ( "Skipping sending proof to ProofAggregationService contract due to budget/time constraints." ) ;
101104 }
102105
103- // Sleep for 3 minutes (15 blocks) before re-evaluating
104- let time_to_sleep = Duration :: from_secs ( 180 ) ;
105106 time_elapsed += time_to_sleep;
106- sleep ( time_to_sleep) ;
107+ sleep ( time_to_sleep) . await ;
107108 }
108109
109110 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments