Skip to content

Commit

Permalink
docs: 📝 Clarify firing of import_notification_stream in doc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ffarall committed Sep 24, 2024
1 parent 08498f5 commit 3cd10e6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions substrate/client/api/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,15 @@ pub trait BlockOf {
pub trait BlockchainEvents<Block: BlockT> {
/// Get block import event stream.
///
/// Not guaranteed to be fired for every imported block, only fired when the node
/// has synced to the tip or there is a re-org. Use `every_import_notification_stream()`
/// Not guaranteed to be fired for every imported block. Use `every_import_notification_stream()`
/// if you want a notification of every imported block regardless.
///
/// This notification stream is fired...
/// - During initial sync process: if there is a re-org while importing blocks. See
/// [here](https://github.com/paritytech/substrate/pull/7118#issuecomment-694091901) for the
/// rationale behind this.
/// - After initial sync process: on every imported block, regardless of whether it is
/// the new best block or not, causes a re-org or not.
fn import_notification_stream(&self) -> ImportNotifications<Block>;

/// Get a stream of every imported block.
Expand Down

0 comments on commit 3cd10e6

Please sign in to comment.