pub fn add_bank_snapshot(
bank_snapshots_dir: impl AsRef<Path>,
bank: &Bank,
snapshot_storages: &[Arc<AccountStorageEntry>],
snapshot_version: SnapshotVersion,
slot_deltas: Vec<BankSlotDelta>,
) -> Result<BankSnapshotInfo>
Expand description
Serialize a bank to a snapshot
DEVELOPER NOTE Any error that is returned from this function may bring down the node! This function is called from AccountsBackgroundService to handle snapshot requests. Since taking a snapshot is not permitted to fail, any errors returned here will trigger the node to shutdown. So, be careful whenever adding new code that may return errors.