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

Method get_snapshot_to_replace

libs/orbit-essentials/src/backup_snapshots.rs:63–69  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

61 }
62
63 pub fn get_snapshot_to_replace(&self) -> Option<Vec<u8>> {
64 if self.backup_snapshots.len() as u64 >= self.max_backup_snapshots {
65 self.backup_snapshots.front().cloned()
66 } else {
67 None
68 }
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 {

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected