MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / list_registered_changes

Method list_registered_changes

atomic-core/src/pristine/txn/read.rs:99–115  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

97 }
98
99 fn list_registered_changes(&self) -> PristineResult<Vec<(NodeId, Hash)>> {
100 let external = self.txn.open_table(EXTERNAL)?;
101 let node_types = self.txn.open_table(NODE_TYPES)?;
102 let mut changes = Vec::new();
103 for result in external.iter()? {
104 let (key, value) = result?;
105 let node_id = NodeId::new(key.value());
106 let is_change = node_types
107 .get(node_id.get())?
108 .map(|node_type| node_type.value() == node_type::CHANGE)
109 .unwrap_or(true);
110 if is_change {
111 changes.push((node_id, Hash::from_bytes(*value.value())));
112 }
113 }
114 Ok(changes)
115 }
116
117 fn iter_adjacent(
118 &self,

Callers 1

Calls 3

getMethod · 0.65
iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected