Skip to content

Commit

Permalink
comment subscribe_with_head
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin committed Sep 3, 2024
1 parent 6075bdb commit 7beb8d9
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions crates/exex/exex/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,14 @@ impl ExExNotificationsSubscriber {
ExExNotifications::Left(ExExNotificationsWithoutHead(&mut self.notifications))
}

/// Subscribe to notifications with the given head.
///
/// Notifications will be sent starting from the head, not inclusive. For example, if
/// `head.number == 10`, then the first notification will be with `block.number == 11`.
pub fn subscribe_with_head(&mut self, head: ExExHead) -> ExExNotifications<'_> {
ExExNotifications::Right(ExExNotificationsWithHead(&mut self.notifications, head))
}
// TODO(alexey): uncomment when backfill is implemented in `ExExNotificationsWithHead`
// /// Subscribe to notifications with the given head.
// ///
// /// Notifications will be sent starting from the head, not inclusive. For example, if
// /// `head.number == 10`, then the first notification will be with `block.number == 11`.
// pub fn subscribe_with_head(&mut self, head: ExExHead) -> ExExNotifications<'_> {
// ExExNotifications::Right(ExExNotificationsWithHead(&mut self.notifications, head))
// }
}

/// A stream of [`ExExNotification`]s. The stream will emit notifications for all blocks.
Expand Down

0 comments on commit 7beb8d9

Please sign in to comment.