forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support completed slot status in geyser (#3069)
* support completed slot status in geyser * missing interface file * Addressed some feedback from Brennan
- Loading branch information
1 parent
6e62af0
commit 07faf4a
Showing
10 changed files
with
65 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use { | ||
solana_sdk::clock::Slot, | ||
std::sync::{Arc, RwLock}, | ||
}; | ||
|
||
pub trait SlotStatusNotifierInterface { | ||
/// Notified when a slot is optimistically confirmed | ||
fn notify_slot_confirmed(&self, slot: Slot, parent: Option<Slot>); | ||
|
||
/// Notified when a slot is marked frozen. | ||
fn notify_slot_processed(&self, slot: Slot, parent: Option<Slot>); | ||
|
||
/// Notified when a slot is rooted. | ||
fn notify_slot_rooted(&self, slot: Slot, parent: Option<Slot>); | ||
|
||
/// Notified when the first shred is received for a slot. | ||
fn notify_first_shred_received(&self, slot: Slot); | ||
|
||
/// Notified when the slot is completed. | ||
fn notify_completed(&self, slot: Slot); | ||
} | ||
|
||
pub type SlotStatusNotifier = Arc<RwLock<dyn SlotStatusNotifierInterface + Sync + Send>>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters