fn on_chain_updated(
        pending_batches: &mut PendingBatchesPool,
        new_chain_head: BlockPair,
        committed_batches: Vec<BatchPair>,
        uncommitted_batches: Vec<BatchPair>,
    ) {
        // Use the new chain head as a sample for calculating the upper bound of the batch pool
        pending_batches.update_limit(new_chain_head.block().batches().len());
        // Rebuild the pending batch pool based on the batches that were committed and uncommitted
        pending_batches.rebuild(Some(committed_batches), Some(uncommitted_batches));
    }
/// Notifies the block publisher that there is a new chain head
///
/// The block publisher uses the provided chain head and committed/uncommitted batches to update
/// the pending batches pool.
///
/// # Arguments
///
/// * `new_chain_head` - The block that was just committed as the chain head
/// * `committed_batches` - All batches in the new chain that were not in the previous chain
/// * `uncommitted_batches` - All batches that were in the old chain but are not in the new one
Notifies the block publisher that there is a new chain head
The block publisher uses the provided chain head and committed/uncommitted batches to update
the pending batches pool.
Notifies the block publisher that there is a new chain head The block publisher uses the provided chain head and committed / uncommitted batches to update the pending batches pool .
fn on_chain_updated(
        pending_batches: &mut PendingBatchesPool,
        new_chain_head: BlockPair,
        committed_batches: Vec<BatchPair>,
        uncommitted_batches: Vec<BatchPair>,
    ) {
        // Use the new chain head as a sample for calculating the upper bound of the batch pool
        pending_batches.update_limit(new_chain_head.block().batches().len());
        // Rebuild the pending batch pool based on the batches that were committed and uncommitted
        pending_batches.rebuild(Some(committed_batches), Some(uncommitted_batches));
    }
fn on_chain_updated ( pending_batches : & mut PendingBatchesPool , new_chain_head : BlockPair , committed_batches : Vec < BatchPair > , uncommitted_batches : Vec < BatchPair > , ) { // Use the new chain head as a sample for calculating the upper bound of the batch pool pending_batches . update_limit ( new_chain_head . block ( ) . batches ( ) . len ( ) ) ; // Rebuild the pending batch pool based on the batches that were committed and uncommitted pending_batches . rebuild ( Some ( committed_batches ) , Some ( uncommitted_batches ) ) ; }
Notifies the block publisher that there is a new chain head
The block publisher uses the provided chain head and committed/uncommitted batches to update
the pending batches pool.
Notifies the block publisher that there is a new chain head The block publisher uses the provided chain head and committed / uncommitted batches to update the pending batches pool .
pending_batches
&mut PendingBatchesPool
new_chain_head
BlockPair
committed_batches
Vec<BatchPair>
uncommitted_batches
Vec<BatchPair>
pending_batches
&mut PendingBatchesPool
new_chain_head
BlockPair
committed_batches
Vec<BatchPair>
uncommitted_batches
Vec<BatchPair>