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

Function tombstone_shadows_earlier_versions

nodedb-array/src/query/ceiling.rs:137–154  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

135
136 #[test]
137 fn tombstone_shadows_earlier_versions() {
138 let v1 = payload(0, OPEN_UPPER, 1);
139 let versions_at_300 = vec![
140 (TileId::new(1, 200), CELL_TOMBSTONE_SENTINEL),
141 (TileId::new(1, 100), v1.as_slice()),
142 ];
143 let result = ceiling_resolve_cell(versions_at_300, &[], &live_params(300, None)).unwrap();
144 assert!(matches!(result, CeilingResult::Tombstoned));
145
146 // Even at cutoff equal to the tombstone's system_from_ms.
147 let v1b = payload(0, OPEN_UPPER, 1);
148 let versions_at_200 = vec![
149 (TileId::new(1, 200), CELL_TOMBSTONE_SENTINEL),
150 (TileId::new(1, 100), v1b.as_slice()),
151 ];
152 let result2 = ceiling_resolve_cell(versions_at_200, &[], &live_params(200, None)).unwrap();
153 assert!(matches!(result2, CeilingResult::Tombstoned));
154 }
155
156 #[test]
157 fn gdpr_erasure_distinct_from_tombstone() {

Callers

nothing calls this directly

Calls 3

ceiling_resolve_cellFunction · 0.85
live_paramsFunction · 0.85
payloadFunction · 0.70

Tested by

no test coverage detected