From bd30783a528dc38760b1646298a469a519812cac Mon Sep 17 00:00:00 2001 From: str4d Date: Fri, 11 Jun 2021 20:23:40 +0100 Subject: [PATCH] Make `hash_layer` comment a doc comment This way, it renders with `cargo doc --document-private-items` --- src/tree.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/tree.rs b/src/tree.rs index 935c71ab..713a2c6e 100644 --- a/src/tree.rs +++ b/src/tree.rs @@ -86,14 +86,14 @@ fn cond_swap(swap: bool, node: pallas::Base, sibling: pallas::Base) -> Pair { } } -// -// The layer with 2^n nodes is called "layer n": -// - leaves are at layer MERKLE_DEPTH_ORCHARD = 32; -// - the root is at layer 0. -// `l_star` is MERKLE_DEPTH_ORCHARD - layer - 1. -// - when hashing two leaves, we produce a node on the layer above the leaves, i.e. -// layer = 31, l_star = 0 -// - when hashing to the final root, we produce the anchor with layer = 0, l_star = 31. +/// +/// The layer with 2^n nodes is called "layer n": +/// - leaves are at layer MERKLE_DEPTH_ORCHARD = 32; +/// - the root is at layer 0. +/// `l_star` is MERKLE_DEPTH_ORCHARD - layer - 1. +/// - when hashing two leaves, we produce a node on the layer above the leaves, i.e. +/// layer = 31, l_star = 0 +/// - when hashing to the final root, we produce the anchor with layer = 0, l_star = 31. fn hash_layer(l_star: usize, pair: Pair) -> pallas::Base { // MerkleCRH Sinsemilla hash domain. let domain = HashDomain::new(MERKLE_CRH_PERSONALIZATION);