MCPcopy Create free account
hub / github.com/diem/move / get_node

Method get_node

language/move-prover/bytecode/src/access_path_trie.rs:252–264  ·  view source on GitHub ↗
(&self, ap: AccessPath)

Source from the content-addressed store, hash-verified

250 }
251
252 fn get_node(&self, ap: AccessPath) -> Option<&TrieNode<T>> {
253 let mut node = match self.0.get(ap.root()) {
254 Some(n) => n,
255 None => return None,
256 };
257 for offset in ap.offsets() {
258 node = match node.get_offset(offset) {
259 Some(n) => n,
260 None => return None,
261 }
262 }
263 Some(node)
264 }
265
266 /// Removes node located at the given access path
267 /// Returns the node if it has been fully removed from the trie (i.e. it did not have any children)

Callers 1

get_access_pathMethod · 0.80

Calls 4

getMethod · 0.45
rootMethod · 0.45
offsetsMethod · 0.45
get_offsetMethod · 0.45

Tested by

no test coverage detected