1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use {
crate::append_vec::StoredAccountMeta,
solana_sdk::{account::AccountSharedData, clock::Slot, pubkey::Pubkey},
std::sync::{Arc, RwLock},
};
pub trait AccountsUpdateNotifierInterface: std::fmt::Debug {
fn notify_account_update(&self, slot: Slot, pubkey: &Pubkey, account: &AccountSharedData);
fn notify_account_restore_from_snapshot(&self, slot: Slot, account: &StoredAccountMeta);
fn notify_slot_confirmed(&self, slot: Slot, parent: Option<Slot>);
fn notify_slot_processed(&self, slot: Slot, parent: Option<Slot>);
fn notify_slot_rooted(&self, slot: Slot, parent: Option<Slot>);
}
pub type AccountsUpdateNotifier = Arc<RwLock<dyn AccountsUpdateNotifierInterface + Sync + Send>>;