Skip to main content

subtree_leaf

Function subtree_leaf 

Source
pub fn subtree_leaf(
    nonce: &[u8; 32],
    challenged_peer_id: &[u8; 32],
    key: &XorName,
    bytes: &[u8],
) -> SubtreeLeaf
Expand description

Build one subtree leaf from its key and the chunk bytes the responder holds.

The plain bytes_hash is the chunk’s content address; the nonced_root is the fresh per-audit nonced block-tree root over the same bytes, committing possession at round-1 time (see crate::replication::slice).