/// Clone the Chain but not the history and note commitment trees, using
/// the specified trees instead.
///
/// Useful when forking, where the trees are rebuilt anyway.
Clone the Chain but not the history and note commitment trees, using
the specified trees instead.

Useful when forking, where the trees are rebuilt anyway.
Clone the Chain but not the history and note commitment trees using the specified trees instead . Useful when forking where the trees are rebuilt anyway .
fn with_trees(
        &self,
        sprout_note_commitment_tree: sprout::tree::NoteCommitmentTree,
        sapling_note_commitment_tree: sapling::tree::NoteCommitmentTree,
        orchard_note_commitment_tree: orchard::tree::NoteCommitmentTree,
        history_tree: HistoryTree,
    ) -> Self {
        Chain {
            network: self.network,
            blocks: self.blocks.clone(),
            height_by_hash: self.height_by_hash.clone(),
            tx_by_hash: self.tx_by_hash.clone(),
            created_utxos: self.created_utxos.clone(),
            spent_utxos: self.spent_utxos.clone(),
            sprout_note_commitment_tree,
            sapling_note_commitment_tree,
            orchard_note_commitment_tree,
            sprout_anchors: self.sprout_anchors.clone(),
            sapling_anchors: self.sapling_anchors.clone(),
            orchard_anchors: self.orchard_anchors.clone(),
            sprout_anchors_by_height: self.sprout_anchors_by_height.clone(),
            sapling_anchors_by_height: self.sapling_anchors_by_height.clone(),
            orchard_anchors_by_height: self.orchard_anchors_by_height.clone(),
            sprout_nullifiers: self.sprout_nullifiers.clone(),
            sapling_nullifiers: self.sapling_nullifiers.clone(),
            orchard_nullifiers: self.orchard_nullifiers.clone(),
            partial_cumulative_work: self.partial_cumulative_work,
            history_tree,
            chain_value_pools: self.chain_value_pools,
        }
    }
fn with_trees ( & self , sprout_note_commitment_tree : sprout :: tree :: NoteCommitmentTree , sapling_note_commitment_tree : sapling :: tree :: NoteCommitmentTree , orchard_note_commitment_tree : orchard :: tree :: NoteCommitmentTree , history_tree : HistoryTree , ) -> Self { Chain { network : self . network , blocks : self . blocks . clone ( ) , height_by_hash : self . height_by_hash . clone ( ) , tx_by_hash : self . tx_by_hash . clone ( ) , created_utxos : self . created_utxos . clone ( ) , spent_utxos : self . spent_utxos . clone ( ) , sprout_note_commitment_tree , sapling_note_commitment_tree , orchard_note_commitment_tree , sprout_anchors : self . sprout_anchors . clone ( ) , sapling_anchors : self . sapling_anchors . clone ( ) , orchard_anchors : self . orchard_anchors . clone ( ) , sprout_anchors_by_height : self . sprout_anchors_by_height . clone ( ) , sapling_anchors_by_height : self . sapling_anchors_by_height . clone ( ) , orchard_anchors_by_height : self . orchard_anchors_by_height . clone ( ) , sprout_nullifiers : self . sprout_nullifiers . clone ( ) , sapling_nullifiers : self . sapling_nullifiers . clone ( ) , orchard_nullifiers : self . orchard_nullifiers . clone ( ) , partial_cumulative_work : self . partial_cumulative_work , history_tree , chain_value_pools : self . chain_value_pools , } }
Clone the Chain but not the history and note commitment trees, using
the specified trees instead.
Clone the Chain but not the history and note commitment trees using the specified trees instead .
&self
<not_specific>
sprout_note_commitment_tree
sprout::tree::NoteCommitmentTree
<not_specific>
sapling_note_commitment_tree
sapling::tree::NoteCommitmentTree
<not_specific>
orchard_note_commitment_tree
orchard::tree::NoteCommitmentTree
<not_specific>
history_tree
HistoryTree
<not_specific>