-
Notifications
You must be signed in to change notification settings - Fork 2
sync::from_latest and latest Modes Should Return Notification::NoPastLogsFound Instead Of Empty Vec #201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
sync::from_latest and latest Modes Should Return Notification::NoPastLogsFound Instead Of Empty Vec #201
Changes from all commits
b1718ad
45b2825
1aaf553
75e5440
388dbdf
a5a34df
077ec3b
a250537
52232e5
e58ad19
a125ce1
82c4d15
270c4da
440ef4b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -5,16 +5,32 @@ use tracing::{info, warn}; | |||||
|
|
||||||
| use crate::ScannerError; | ||||||
|
|
||||||
| #[derive(Debug, Clone)] | ||||||
| /// Messages streamed by the scanner to subscribers. | ||||||
| /// | ||||||
| /// Each message represents either data (logs), an error, or a notification about the scanner's | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit:
Suggested change
No more error :D Also not always logs? |
||||||
| /// state or behavior. | ||||||
| #[derive(Copy, Debug, Clone)] | ||||||
| pub enum ScannerMessage<T: Clone> { | ||||||
| /// Data streamed to the subscriber. | ||||||
| Data(T), | ||||||
|
|
||||||
| /// Notification about scanner state changes or important events. | ||||||
|
Comment on lines
+14
to
+17
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Also wonder how useful these are Data is self explanatory and Notification comment is the same above the notification enum |
||||||
| Notification(Notification), | ||||||
| } | ||||||
|
|
||||||
| /// Notifications emitted by the scanner to signal state changes or important events. | ||||||
| #[derive(Copy, Debug, Clone, PartialEq)] | ||||||
| pub enum Notification { | ||||||
| /// Emitted when transitioning from the latest events phase to live streaming mode | ||||||
| /// in sync scanners. | ||||||
| SwitchingToLive, | ||||||
|
|
||||||
| /// Emitted when a blockchain reorganization is detected during scanning. | ||||||
| ReorgDetected, | ||||||
|
|
||||||
| /// Emitted during the latest events phase when no matching logs are found in the | ||||||
| /// scanned range. | ||||||
| NoPastLogsFound, | ||||||
| } | ||||||
|
|
||||||
| impl<T: Clone> From<Notification> for ScannerMessage<T> { | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: