MCPcopy Create free account
hub / github.com/dfinity/orbit / insert_snapshot

Method insert_snapshot

libs/orbit-essentials/src/backup_snapshots.rs:71–76  ·  view source on GitHub ↗
(&mut self, snapshot_id: Vec<u8>)

Source from the content-addressed store, hash-verified

69 }
70
71 pub fn insert_snapshot(&mut self, snapshot_id: Vec<u8>) {
72 if self.backup_snapshots.len() as u64 >= self.max_backup_snapshots {
73 let _ = self.backup_snapshots.pop_front();
74 }
75 self.backup_snapshots.push_back(snapshot_id);
76 }
77}

Callers 2

insert_backup_snapshotFunction · 0.80

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected