/// Updates the queue's upper bound by adding the number of consumed batches as a new sample
///
/// The new sample is added if either of the following conditions are met:
///
/// * The number of consumed batches is greater than the current rolling average
/// * The number of batches remaining in the queue is greater than the current rolling average
///
/// The first condition ensures that the average is adjusted upward when more batches than the
/// current average are consumed. The second condition ensures that the average is adjusted
/// downward when more batches have been added than have been consumed.
///
/// If neither of the conditions is met, the sample is not added. This ensures that the average
/// is not adjusted when fewer batches were added than the rolling average suggests can be
/// consumed. The purpose of the queue's upper bound is to provide a best guess for how many
/// batches can be consumed per block; it should not be reduced when the limiting factor is how
/// many batches are being submitted instead of how many batches are being consumed. This
/// sample would not be a good representation of the network's throughput capability.
Updates the queue's upper bound by adding the number of consumed batches as a new sample
The new sample is added if either of the following conditions are met.

The number of consumed batches is greater than the current rolling average
The number of batches remaining in the queue is greater than the current rolling average

The first condition ensures that the average is adjusted upward when more batches than the
current average are consumed. The second condition ensures that the average is adjusted
downward when more batches have been added than have been consumed.

If neither of the conditions is met, the sample is not added. This ensures that the average
is not adjusted when fewer batches were added than the rolling average suggests can be
consumed. The purpose of the queue's upper bound is to provide a best guess for how many
batches can be consumed per block; it should not be reduced when the limiting factor is how
many batches are being submitted instead of how many batches are being consumed. This
sample would not be a good representation of the network's throughput capability.
Updates the queue ' s upper bound by adding the number of consumed batches as a new sample The new sample is added if either of the following conditions are met . The number of consumed batches is greater than the current rolling average The number of batches remaining in the queue is greater than the current rolling average The first condition ensures that the average is adjusted upward when more batches than the current average are consumed . The second condition ensures that the average is adjusted downward when more batches have been added than have been consumed . If neither of the conditions is met the sample is not added . This ensures that the average is not adjusted when fewer batches were added than the rolling average suggests can be consumed . The purpose of the queue ' s upper bound is to provide a best guess for how many batches can be consumed per block ; it should not be reduced when the limiting factor is how many batches are being submitted instead of how many batches are being consumed . This sample would not be a good representation of the network ' s throughput capability .
pub fn update_bound(&mut self, consumed: usize) {
        let current_average = self.rolling_average.value();
        if consumed > current_average || self.batches.len() > current_average {
            self.rolling_average.add_sample(consumed);
        }
    }
pub fn update_bound ( & mut self , consumed : usize ) { let current_average = self . rolling_average . value ( ) ; if consumed > current_average || self . batches . len ( ) > current_average { self . rolling_average . add_sample ( consumed ) ; } }
Updates the queue's upper bound by adding the number of consumed batches as a new sample
The new sample is added if either of the following conditions are met:
Updates the queue ' s upper bound by adding the number of consumed batches as a new sample The new sample is added if either of the following conditions are met :
&mut self
consumed
usize