MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / truncate

Method truncate

nodedb-raft/src/storage.rs:62–65  ·  view source on GitHub ↗
(&mut self, index: u64)

Source from the content-addressed store, hash-verified

60 }
61
62 fn truncate(&mut self, index: u64) -> Result<()> {
63 self.entries.retain(|e| e.index < index);
64 Ok(())
65 }
66
67 fn load_entries_after(&self, snapshot_index: u64) -> Result<Vec<LogEntry>> {
68 Ok(self

Callers 2

truncate_fromMethod · 0.45
mem_storage_truncateFunction · 0.45

Calls

no outgoing calls

Tested by 1

mem_storage_truncateFunction · 0.36