MCPcopy Create free account
hub / github.com/SeismicSystems/summit / root

Method root

types/src/ssz_tree.rs:54–59  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

52 /// Returns the root hash (always up to date).
53 #[inline]
54 pub fn root(&self) -> [u8; 32] {
55 if self.capacity == 0 {
56 return [0u8; 32];
57 }
58 self.nodes[1]
59 }
60
61 /// Returns the leaf value at the given 0-based index.
62 #[inline]

Calls

no outgoing calls