pub fn register_other_partition(
        &mut self,
        sequencer_numbers: &BTreeMap<u32, OptionalMinMaxSequence>,
    ) {
        for (sequencer_id, min_max) in sequencer_numbers {
            match self
                .database_checkpoint
                .sequencer_numbers
                .entry(*sequencer_id)
            {
                Vacant(v) => {
                    v.insert(*min_max);
                }
                Occupied(mut o) => {
                    let existing_min_max = o.get_mut();
                    let min = match (existing_min_max.min(), min_max.min()) {
                        (Some(a), Some(b)) => Some(a.min(b)),
                        (Some(a), None) => Some(a),
                        (None, Some(b)) => Some(b),
                        (None, None) => None,
                    };
                    let max = existing_min_max.max().max(min_max.max());
                    *existing_min_max = OptionalMinMaxSequence::new(min, max);
                }
            }
        }
    }
/// Registers other partition and keeps track of the overall min sequence numbers.
Registers other partition and keeps track of the overall min sequence numbers.
Registers other partition and keeps track of the overall min sequence numbers .
pub fn register_other_partition(
        &mut self,
        sequencer_numbers: &BTreeMap<u32, OptionalMinMaxSequence>,
    ) {
        for (sequencer_id, min_max) in sequencer_numbers {
            match self
                .database_checkpoint
                .sequencer_numbers
                .entry(*sequencer_id)
            {
                Vacant(v) => {
                    v.insert(*min_max);
                }
                Occupied(mut o) => {
                    let existing_min_max = o.get_mut();
                    let min = match (existing_min_max.min(), min_max.min()) {
                        (Some(a), Some(b)) => Some(a.min(b)),
                        (Some(a), None) => Some(a),
                        (None, Some(b)) => Some(b),
                        (None, None) => None,
                    };
                    let max = existing_min_max.max().max(min_max.max());
                    *existing_min_max = OptionalMinMaxSequence::new(min, max);
                }
            }
        }
    }
pub fn register_other_partition ( & mut self , sequencer_numbers : & BTreeMap < u32 , OptionalMinMaxSequence > , ) { for ( sequencer_id , min_max ) in sequencer_numbers { match self . database_checkpoint . sequencer_numbers . entry ( * sequencer_id ) { Vacant ( v ) => { v . insert ( * min_max ) ; } Occupied ( mut o ) => { let existing_min_max = o . get_mut ( ) ; let min = match ( existing_min_max . min ( ) , min_max . min ( ) ) { ( Some ( a ) , Some ( b ) ) => Some ( a . min ( b ) ) , ( Some ( a ) , None ) => Some ( a ) , ( None , Some ( b ) ) => Some ( b ) , ( None , None ) => None , } ; let max = existing_min_max . max ( ) . max ( min_max . max ( ) ) ; * existing_min_max = OptionalMinMaxSequence :: new ( min , max ) ; } } } }
Registers other partition and keeps track of the overall min sequence numbers.
Registers other partition and keeps track of the overall min sequence numbers .
&mut self
sequencer_numbers
&BTreeMap<u32, OptionalMinMaxSequence>
&mut self
sequencer_numbers
&BTreeMap<u32, OptionalMinMaxSequence>