pub fn generate_data_root(mut nodes: Vec<Node>, crypto: &Provider) -> Result<Node, Error> {
    while nodes.len() > 1 {
        nodes = build_layer_2(nodes, &crypto)?;
    }
    let root = nodes.pop().unwrap();
    Ok(root)
}
/// Builds all layers from leaves up to single root node.
Builds all layers from leaves up to single root node.
Builds all layers from leaves up to single root node .
pub fn generate_data_root(mut nodes: Vec<Node>, crypto: &Provider) -> Result<Node, Error> {
    while nodes.len() > 1 {
        nodes = build_layer_2(nodes, &crypto)?;
    }
    let root = nodes.pop().unwrap();
    Ok(root)
}
pub fn generate_data_root ( mut nodes : Vec < Node > , crypto : & Provider ) -> Result < Node , Error > { while nodes . len ( ) > 1 { nodes = build_layer_2 ( nodes , & crypto ) ? ; } let root = nodes . pop ( ) . unwrap ( ) ; Ok ( root ) }
Builds all layers from leaves up to single root node.
Builds all layers from leaves up to single root node .
nodes
Vec<Node>
crypto
&Provider
nodes
Vec<Node>
crypto
&Provider