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

Function drop_below_removes_old

nodedb/src/control/array_sync/op_log.rs:385–393  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

383
384 #[test]
385 fn drop_below_removes_old() {
386 let log = OriginOpLog::open_in_memory().unwrap();
387 for ms in [10, 20, 30] {
388 log.append(&make_op("a", ms)).unwrap();
389 }
390 let dropped = log.drop_below(hlc(20)).unwrap();
391 assert_eq!(dropped, 1);
392 assert_eq!(log.len().unwrap(), 2);
393 }
394}

Callers

nothing calls this directly

Calls 4

make_opFunction · 0.70
hlcFunction · 0.70
appendMethod · 0.45
drop_belowMethod · 0.45

Tested by

no test coverage detected