@@ -285,7 +285,7 @@ impl RuntimeHost {
285285
286286 fn matches_block_trigger ( & self , block_trigger_type : & EthereumBlockTriggerType ) -> bool {
287287 let source_address_matches = match block_trigger_type {
288- EthereumBlockTriggerType :: WithCallTo ( address) => {
288+ EthereumBlockTriggerType :: WithCallTo ( address, _block_type ) => {
289289 self . data_source_contract
290290 . address
291291 // Do not match if this datasource has no address
@@ -347,7 +347,7 @@ impl RuntimeHost {
347347 trigger_type : & EthereumBlockTriggerType ,
348348 ) -> Result < MappingBlockHandler , anyhow:: Error > {
349349 match trigger_type {
350- EthereumBlockTriggerType :: Every ( _type ) => self
350+ EthereumBlockTriggerType :: Every ( _block_type ) => self
351351 . data_source_block_handlers
352352 . iter ( )
353353 . find ( move |handler| handler. filter == None )
@@ -359,7 +359,7 @@ impl RuntimeHost {
359359 self . data_source_name,
360360 )
361361 } ) ,
362- EthereumBlockTriggerType :: WithCallTo ( _address) => self
362+ EthereumBlockTriggerType :: WithCallTo ( _address, _block_type ) => self
363363 . data_source_block_handlers
364364 . iter ( )
365365 . find ( move |handler| {
@@ -577,23 +577,20 @@ impl RuntimeHostTrait for RuntimeHost {
577577 ) -> Result < BlockState , anyhow:: Error > {
578578 let block_handler = self . handler_for_block ( trigger_type) ?;
579579 let mapping_block: EthereumBlockType = match trigger_type {
580- EthereumBlockTriggerType :: Every ( BlockType :: FullWithReceipts ) => {
581- match graph:: block_on_allow_panic (
582- future:: lazy ( move || {
583- self . host_exports
584- . ethereum_adapter
585- . load_full_block ( logger, block. light_block ( ) . clone ( ) )
586- } )
587- . compat ( ) ,
588- ) {
589- Ok ( block) => Ok ( EthereumBlockType :: FullWithReceipts ( block) ) ,
590- Err ( e) => Err ( anyhow:: anyhow!(
591- "Failed to load full block: {}, error: {}" ,
592- & block. number( ) . to_string( ) ,
593- e
594- ) ) ,
595- } ?
596- }
580+ EthereumBlockTriggerType :: Every ( BlockType :: FullWithReceipts ) => match self
581+ . host_exports
582+ . ethereum_adapter
583+ . load_full_block ( logger, block. light_block ( ) . clone ( ) )
584+ . compat ( )
585+ . await
586+ {
587+ Ok ( block) => Ok ( EthereumBlockType :: FullWithReceipts ( block) ) ,
588+ Err ( e) => Err ( anyhow:: anyhow!(
589+ "Failed to load full block: {}, error: {}" ,
590+ & block. number( ) . to_string( ) ,
591+ e
592+ ) ) ,
593+ } ?,
597594 EthereumBlockTriggerType :: Every ( BlockType :: Full ) => {
598595 EthereumBlockType :: Full ( block. light_block ( ) . clone ( ) )
599596 }
0 commit comments