clone_solana_accounts_db/
accounts_update_notifier_interface.rs1use {
2 crate::account_storage::meta::StoredAccountMeta,
3 clone_solana_pubkey::Pubkey,
4 clone_solana_sdk::{
5 account::AccountSharedData, clock::Slot, transaction::SanitizedTransaction,
6 },
7 std::sync::Arc,
8};
9
10pub trait AccountsUpdateNotifierInterface: std::fmt::Debug {
11 fn snapshot_notifications_enabled(&self) -> bool;
13
14 fn notify_account_update(
16 &self,
17 slot: Slot,
18 account: &AccountSharedData,
19 txn: &Option<&SanitizedTransaction>,
20 pubkey: &Pubkey,
21 write_version: u64,
22 );
23
24 fn notify_account_restore_from_snapshot(&self, slot: Slot, account: &StoredAccountMeta);
27
28 fn notify_end_of_restore_from_snapshot(&self);
30}
31
32pub type AccountsUpdateNotifier = Arc<dyn AccountsUpdateNotifierInterface + Sync + Send>;