pub fn append_front(&mut self, batches: Vec<BatchPair>) {
        // Remove any duplicates
        self.batches.retain(|batch| !batches.contains(batch));

        for batch in batches.into_iter().rev() {
            self.ids.insert(batch.batch().header_signature().into());
            self.batches.push_front(batch);
        }

        gauge!(PENDING_BATCH_GAUGE, self.batches.len() as i64);
    }
/// Adds batches to the front of the queue in the order they are passed in
///
/// This is used to prioritize batches, usually when they are uncommitted (when switching away
/// from a fork in the blockchain, for instance) or when they should skip the queue and be
/// executed as soon as possible (settings transactions may be prioritized, for instance).
///
/// Unlike `push_back`, this method will add the batches to the queue even if it's full. If any
/// of the batches is already in the queue, the old one will be removed.
Adds batches to the front of the queue in the order they are passed in
This is used to prioritize batches, usually when they are uncommitted (when switching away
from a fork in the blockchain, for instance) or when they should skip the queue and be
executed as soon as possible (settings transactions may be prioritized, for instance).

Unlike `push_back`, this method will add the batches to the queue even if it's full. If any
of the batches is already in the queue, the old one will be removed.
Adds batches to the front of the queue in the order they are passed in This is used to prioritize batches usually when they are uncommitted ( when switching away from a fork in the blockchain for instance ) or when they should skip the queue and be executed as soon as possible ( settings transactions may be prioritized for instance ) . Unlike ` push_back ` this method will add the batches to the queue even if it ' s full . If any of the batches is already in the queue the old one will be removed .
pub fn append_front(&mut self, batches: Vec<BatchPair>) {
        // Remove any duplicates
        self.batches.retain(|batch| !batches.contains(batch));
        for batch in batches.into_iter().rev() {
            self.ids.insert(batch.batch().header_signature().into());
            self.batches.push_front(batch);
        }
        gauge!(PENDING_BATCH_GAUGE, self.batches.len() as i64);
    }
pub fn append_front ( & mut self , batches : Vec < BatchPair > ) { // Remove any duplicates self . batches . retain ( | batch | ! batches . contains ( batch ) ) ; for batch in batches . into_iter ( ) . rev ( ) { self . ids . insert ( batch . batch ( ) . header_signature ( ) . into ( ) ) ; self . batches . push_front ( batch ) ; } gauge ! ( PENDING_BATCH_GAUGE self batches len ( ) as i64 ) ; }
Adds batches to the front of the queue in the order they are passed in
This is used to prioritize batches, usually when they are uncommitted (when switching away
from a fork in the blockchain, for instance) or when they should skip the queue and be
executed as soon as possible (settings transactions may be prioritized, for instance).
Adds batches to the front of the queue in the order they are passed in This is used to prioritize batches usually when they are uncommitted ( when switching away from a fork in the blockchain for instance ) or when they should skip the queue and be executed as soon as possible ( settings transactions may be prioritized for instance ) .
&mut self
batches
Vec<BatchPair>
&mut self
batches
Vec<BatchPair>