@@ -285,7 +285,7 @@ impl RuntimeHost {
285
285
286
286
fn matches_block_trigger ( & self , block_trigger_type : & EthereumBlockTriggerType ) -> bool {
287
287
let source_address_matches = match block_trigger_type {
288
- EthereumBlockTriggerType :: WithCallTo ( address) => {
288
+ EthereumBlockTriggerType :: WithCallTo ( address, _block_type ) => {
289
289
self . data_source_contract
290
290
. address
291
291
// Do not match if this datasource has no address
@@ -347,7 +347,7 @@ impl RuntimeHost {
347
347
trigger_type : & EthereumBlockTriggerType ,
348
348
) -> Result < MappingBlockHandler , anyhow:: Error > {
349
349
match trigger_type {
350
- EthereumBlockTriggerType :: Every ( _type ) => self
350
+ EthereumBlockTriggerType :: Every ( _block_type ) => self
351
351
. data_source_block_handlers
352
352
. iter ( )
353
353
. find ( move |handler| handler. filter == None )
@@ -359,7 +359,7 @@ impl RuntimeHost {
359
359
self . data_source_name,
360
360
)
361
361
} ) ,
362
- EthereumBlockTriggerType :: WithCallTo ( _address) => self
362
+ EthereumBlockTriggerType :: WithCallTo ( _address, _block_type ) => self
363
363
. data_source_block_handlers
364
364
. iter ( )
365
365
. find ( move |handler| {
@@ -577,23 +577,20 @@ impl RuntimeHostTrait for RuntimeHost {
577
577
) -> Result < BlockState , anyhow:: Error > {
578
578
let block_handler = self . handler_for_block ( trigger_type) ?;
579
579
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
+ } ?,
597
594
EthereumBlockTriggerType :: Every ( BlockType :: Full ) => {
598
595
EthereumBlockType :: Full ( block. light_block ( ) . clone ( ) )
599
596
}
0 commit comments