File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
crates/apollo_gateway/src Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ impl StatefulTransactionValidatorFactoryTrait for StatefulTransactionValidatorFa
8080 e,
8181 )
8282 } ) ?;
83- let latest_block_info = get_latest_block_info ( & state_reader, runtime ) ?;
83+ let latest_block_info = runtime . block_on ( get_latest_block_info ( & state_reader) ) ?;
8484
8585 let state_reader_and_contract_manager = StateReaderAndContractManager {
8686 state_reader,
@@ -349,12 +349,11 @@ fn skip_stateful_validations(
349349 Ok ( false )
350350}
351351
352- // TODO(Itamar): Remove using runtime here and make it async.
353- pub fn get_latest_block_info (
352+ async fn get_latest_block_info (
354353 state_reader : & dyn MempoolStateReader ,
355- runtime : tokio:: runtime:: Handle ,
356354) -> StatefulTransactionValidatorResult < BlockInfo > {
357- runtime
358- . block_on ( state_reader. get_block_info ( ) )
355+ state_reader
356+ . get_block_info ( )
357+ . await
359358 . map_err ( |e| StarknetError :: internal_with_logging ( "Failed to get latest block info" , e) )
360359}
You can’t perform that action at this time.
0 commit comments