fn revert_chain_with(
        &mut self,
        block_value_pool_change: &ValueBalance<NegativeAllowed>,
        position: RevertPosition,
    ) {
        use std::ops::Neg;

        if position == RevertPosition::Tip {
            self.chain_value_pools = self
                .chain_value_pools
                .add_chain_value_pool_change(block_value_pool_change.neg())
                .expect("reverting the tip will leave the pools in a previously valid state");
        }
    }
/// Revert the chain state using a block chain value pool change.
///
/// When forking from the tip, subtract the block's chain value pool change.
///
/// When finalizing the root, leave the chain value pool balances unchanged.
/// [`chain_value_pools`] tracks the chain value pools for all finalized blocks,
/// and the non-finalized blocks in this chain.
/// So finalizing the root doesn't change the set of blocks it tracks.
///
/// # Panics
///
/// Panics if the chain pool value balance is invalid
/// after we subtract the block value pool change.
Revert the chain state using a block chain value pool change.
When forking from the tip, subtract the block's chain value pool change.

When finalizing the root, leave the chain value pool balances unchanged.
[`chain_value_pools`] tracks the chain value pools for all finalized blocks,
and the non-finalized blocks in this chain.
So finalizing the root doesn't change the set of blocks it tracks.
Revert the chain state using a block chain value pool change . When forking from the tip subtract the block ' s chain value pool change . When finalizing the root leave the chain value pool balances unchanged . [ ` chain_value_pools ` ] tracks the chain value pools for all finalized blocks and the non - finalized blocks in this chain . So finalizing the root doesn ' t change the set of blocks it tracks .
fn revert_chain_with(
        &mut self,
        block_value_pool_change: &ValueBalance<NegativeAllowed>,
        position: RevertPosition,
    ) {
        use std::ops::Neg;
        if position == RevertPosition::Tip {
            self.chain_value_pools = self
                .chain_value_pools
                .add_chain_value_pool_change(block_value_pool_change.neg())
                .expect("reverting the tip will leave the pools in a previously valid state");
        }
    }
fn revert_chain_with ( & mut self , block_value_pool_change : & ValueBalance < NegativeAllowed > , position : RevertPosition , ) { use std :: ops :: Neg ; if position == RevertPosition :: Tip { self . chain_value_pools = self . chain_value_pools . add_chain_value_pool_change ( block_value_pool_change . neg ( ) ) . expect ( " " ) ; } }
Revert the chain state using a block chain value pool change.
Revert the chain state using a block chain value pool change .
&mut self
block_value_pool_change
&ValueBalance<NegativeAllowed>
position
RevertPosition
panics
Panics if the chain pool value balance is invalid
after we subtract the block value pool change.
Panics if the chain pool value balance is invalid after we subtract the block value pool change .