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

Method find_block

atomic-core/src/output/alive/retrieve/tests.rs:123–134  ·  view source on GitHub ↗
(&self, pos: Position<NodeId>)

Source from the content-addressed store, hash-verified

121 }
122
123 fn find_block(&self, pos: Position<NodeId>) -> Result<GraphNode<NodeId>, PristineError> {
124 if let Some(fault) = self.find_block_faults.get(&pos) {
125 return Err(fault.into_error());
126 }
127 self.blocks
128 .get(&pos)
129 .copied()
130 .ok_or(PristineError::BlockNotFound {
131 change: pos.change.get(),
132 pos: pos.pos.get(),
133 })
134 }
135
136 fn find_block_end(&self, pos: Position<NodeId>) -> Result<GraphNode<NodeId>, PristineError> {
137 if let Some(fault) = self.find_block_end_faults.get(&pos) {

Callers 4

retrieve_graphFunction · 0.45
replacement_rootsFunction · 0.45
walk_through_deadFunction · 0.45
visible_chain_reachesFunction · 0.45

Calls 2

into_errorMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected