MCPcopy Create free account
hub / github.com/argumentcomputer/ix / root

Method root

crates/ixon/src/assumption_tree.rs:106–112  ·  view source on GitHub ↗

Recursively compute the root hash.

(&self)

Source from the content-addressed store, hash-verified

104
105 /// Recursively compute the root hash.
106 pub fn root(&self) -> Address {
107 match self {
108 AssumptionTree::Leaf(addr) => leaf_hash(addr),
109 AssumptionTree::Padding => zero_address(),
110 AssumptionTree::Node(l, r) => node_hash(&l.root(), &r.root()),
111 }
112 }
113
114 /// In-order traversal of real leaves (skips `Padding`).
115 pub fn leaves(&self) -> Vec<Address> {

Callers 3

search_pathMethod · 0.80

Calls 3

leaf_hashFunction · 0.85
zero_addressFunction · 0.85
node_hashFunction · 0.85

Tested by 1