use super::policy;
use ic_memory::{DiagnosticExport, MemoryManagerAuthorityRecord, RuntimeDiagnosticError};
pub const MEMORY_LEDGER_SCHEMA_VERSION: u32 = 1;
pub const MEMORY_PHYSICAL_FORMAT_ID: u32 = 1;
pub struct NativeMemoryLedgerSnapshot {
pub export: DiagnosticExport,
pub authorities: Vec<MemoryManagerAuthorityRecord>,
}
pub fn try_snapshot() -> Result<NativeMemoryLedgerSnapshot, RuntimeDiagnosticError> {
Ok(NativeMemoryLedgerSnapshot {
export: ic_memory::default_memory_manager_diagnostic_export()?,
authorities: policy::canonical_authority_records(),
})
}