Skip to content

Commit

Permalink
S3 & Historical processing errors are bubbled up to single handler.
Browse files Browse the repository at this point in the history
RPC block date lookup handles missing blocks.
  • Loading branch information
gabehamilton committed Jul 28, 2023
1 parent 814dff8 commit fa2c00a
Show file tree
Hide file tree
Showing 5 changed files with 248 additions and 266 deletions.
8 changes: 4 additions & 4 deletions indexer/indexer_rules_engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ pub fn reduce_indexer_rule_matches_sync(
indexer_rule: &IndexerRule,
streamer_message: &StreamerMessage,
chain_id: ChainId,
) -> anyhow::Result<Vec<IndexerRuleMatch>> {
Ok(match &indexer_rule.matching_rule {
) -> Vec<IndexerRuleMatch> {
match &indexer_rule.matching_rule {
MatchingRule::ActionAny { .. }
| MatchingRule::ActionFunctionCall { .. }
| MatchingRule::Event { .. } => {
outcomes_reducer_sync::reduce_indexer_rule_matches_from_outcomes(
indexer_rule,
streamer_message,
chain_id,
)?
)
}
})
}
}
8 changes: 4 additions & 4 deletions indexer/indexer_rules_engine/src/outcomes_reducer_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub fn reduce_indexer_rule_matches_from_outcomes(
indexer_rule: &IndexerRule,
streamer_message: &StreamerMessage,
chain_id: ChainId,
) -> anyhow::Result<Vec<IndexerRuleMatch>> {
) -> Vec<IndexerRuleMatch> {
streamer_message
.shards
.iter()
Expand Down Expand Up @@ -41,8 +41,8 @@ fn build_indexer_rule_match(
block_header_hash: String,
block_height: u64,
chain_id: ChainId,
) -> anyhow::Result<IndexerRuleMatch> {
Ok(IndexerRuleMatch {
) -> IndexerRuleMatch {
IndexerRuleMatch {
chain_id: chain_id.clone(),
indexer_rule_id: indexer_rule.id,
indexer_rule_name: indexer_rule.name.clone(),
Expand All @@ -52,7 +52,7 @@ fn build_indexer_rule_match(
block_header_hash,
),
block_height,
})
}
}

fn build_indexer_rule_match_payload(
Expand Down
Loading

0 comments on commit fa2c00a

Please sign in to comment.