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

Function record_is_monotonic

nodedb-array/src/sync/ack.rs:80–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78
79 #[test]
80 fn record_is_monotonic() {
81 let mut av = AckVector::new();
82 av.record(r(1), hlc(100));
83 av.record(r(1), hlc(50)); // lower — must be ignored
84 assert_eq!(av.ack_for(r(1)), Some(hlc(100)));
85
86 av.record(r(1), hlc(200)); // higher — must advance
87 assert_eq!(av.ack_for(r(1)), Some(hlc(200)));
88 }
89
90 #[test]
91 fn min_returns_lowest() {

Callers

nothing calls this directly

Calls 3

rFunction · 0.70
hlcFunction · 0.70
recordMethod · 0.45

Tested by

no test coverage detected