fn merge_direct_path_keys(
        &mut self,
        direct_path: &UpdatePath,
        path: Vec<NodeIndex>,
    ) -> Result<(), TreeError> {
        debug_assert_eq!(direct_path.nodes.len(), path.len());
        if direct_path.nodes.len() != path.len() {
            return Err(TreeError::InvalidArguments);
        }

        for (i, p) in path.iter().enumerate() {
            let public_key = direct_path.nodes[i].clone().public_key;
            let node = ParentNode::new(public_key.clone(), &[], &[]);
            self.nodes[p].node = Some(node);
        }

        Ok(())
    }
/// Merge public keys from a direct path to this tree along the given path.
Merge public keys from a direct path to this tree along the given path.
Merge public keys from a direct path to this tree along the given path .
fn merge_direct_path_keys(
        &mut self,
        direct_path: &UpdatePath,
        path: Vec<NodeIndex>,
    ) -> Result<(), TreeError> {
        debug_assert_eq!(direct_path.nodes.len(), path.len());
        if direct_path.nodes.len() != path.len() {
            return Err(TreeError::InvalidArguments);
        }
        for (i, p) in path.iter().enumerate() {
            let public_key = direct_path.nodes[i].clone().public_key;
            let node = ParentNode::new(public_key.clone(), &[], &[]);
            self.nodes[p].node = Some(node);
        }
        Ok(())
    }
fn merge_direct_path_keys ( & mut self , direct_path : & UpdatePath , path : Vec < NodeIndex > , ) -> Result < ( ) , TreeError > { debug_assert_eq ! ( direct_path nodes len ( ) path len ( ) ) ; if direct_path . nodes . len ( ) != path . len ( ) { return Err ( TreeError :: InvalidArguments ) ; } for ( i , p ) in path . iter ( ) . enumerate ( ) { let public_key = direct_path . nodes [ i ] . clone ( ) . public_key ; let node = ParentNode :: new ( public_key . clone ( ) , & [ ] , & [ ] ) ; self . nodes [ p ] . node = Some ( node ) ; } Ok ( ( ) ) }
Merge public keys from a direct path to this tree along the given path.
Merge public keys from a direct path to this tree along the given path .
&mut self
direct_path
&UpdatePath
path
Vec<NodeIndex>
&mut self
direct_path
&UpdatePath
path
Vec<NodeIndex>