Skip to content

Commit

Permalink
feat: CFE filers based on expires_at
Browse files Browse the repository at this point in the history
  • Loading branch information
kylezs committed Sep 21, 2023
1 parent fccfe67 commit 600af8e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ where
// FOr a given header we only witness addresses opened at or before the header, the set of
// addresses each engine attempts to witness at a given block is consistent
fn addresses_for_header(index: Inner::Index, addresses: &Addresses<Inner>) -> Addresses<Inner> {
addresses.iter().filter(|details| details.opened_at <= index).cloned().collect()
addresses
.iter()
.filter(|details| details.opened_at <= index && index <= details.expires_at)
.cloned()
.collect()
}

async fn get_chain_state_and_addresses<StateChainClient: StorageApi + Send + Sync + 'static>(
Expand Down

0 comments on commit 600af8e

Please sign in to comment.