From 44c0385bea7182369c9c0d82f186b143dfe1272a Mon Sep 17 00:00:00 2001 From: Zoran Cvetkov Date: Tue, 13 Aug 2024 14:33:33 +0300 Subject: [PATCH] fixes --- graph/src/blockchain/block_stream.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/graph/src/blockchain/block_stream.rs b/graph/src/blockchain/block_stream.rs index c1b409bef47..ee69083588e 100644 --- a/graph/src/blockchain/block_stream.rs +++ b/graph/src/blockchain/block_stream.rs @@ -363,9 +363,7 @@ impl TriggersAdapterWrapper { if let Some(entity_type) = ent.first() { let et = schema.entity_type(entity_type).unwrap(); - let f: u32 = from as u32; - let t: u32 = to as u32; - let br: Range = f..t; + let br: Range = from..to; let entities = store.get_range(&et, br)?; return self .subgraph_triggers( @@ -413,7 +411,7 @@ impl TriggersAdapterWrapper { from: BlockNumber, to: BlockNumber, filter: &Arc>, - entities: BTreeMap, + entities: BTreeMap>, ) -> Result<(Vec>, BlockNumber), Error> { let logger2 = logger.cheap_clone(); let adapter = self.adapter.clone(); @@ -427,7 +425,7 @@ impl TriggersAdapterWrapper { match entities.get(&key) { Some(e) => { let trigger_data = - vec![Self::create_subgraph_trigger_from_entity(first_filter, e)]; + Self::create_subgraph_trigger_from_entity(first_filter, e); Some(BlockWithTriggers::new_with_subgraph_triggers( block, trigger_data,