Skip to content

Commit

Permalink
address review
Browse files Browse the repository at this point in the history
  • Loading branch information
zorancv committed Dec 9, 2024
1 parent ebfe059 commit 13e2a98
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions graph/src/blockchain/block_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,12 +455,12 @@ async fn get_entities_for_range(
from: BlockNumber,
to: BlockNumber,
) -> Result<BTreeMap<BlockNumber, Vec<EntityWithType>>, Error> {
let mut entity_types = vec![];
for entity_name in &filter.entities {
let entity_type = schema.entity_type(entity_name)?;
entity_types.push(entity_type);
}
Ok(store.get_range(entity_types, CausalityRegion::ONCHAIN, from..to)?)
let entity_types: Result<Vec<EntityType>> = filter
.entities
.iter()
.map(|name| schema.entity_type(name))
.collect();
Ok(store.get_range(entity_types?, CausalityRegion::ONCHAIN, from..to)?)
}

impl<C: Blockchain> TriggersAdapterWrapper<C> {
Expand Down

0 comments on commit 13e2a98

Please sign in to comment.