solana_runtime/
accounts_update_notifier_interface.rs1use {
2 crate::append_vec::{StoredAccountMeta, StoredMeta},
3 solana_sdk::{account::AccountSharedData, clock::Slot, signature::Signature},
4 std::sync::{Arc, RwLock},
5};
6
7pub trait AccountsUpdateNotifierInterface: std::fmt::Debug {
8 fn notify_account_update(
10 &self,
11 slot: Slot,
12 meta: &StoredMeta,
13 account: &AccountSharedData,
14 txn_signature: &Option<&Signature>,
15 );
16
17 fn notify_account_restore_from_snapshot(&self, slot: Slot, account: &StoredAccountMeta);
20
21 fn notify_end_of_restore_from_snapshot(&self);
23}
24
25pub type AccountsUpdateNotifier = Arc<RwLock<dyn AccountsUpdateNotifierInterface + Sync + Send>>;