[−][src]Trait hbbft::transaction_queue::TransactionQueue
An interface to the transaction queue. A transaction queue is a structural part of
QueueingHoneyBadger
that manages enqueueing of transactions for a future batch and dequeueing
of transactions to become part of a current batch.
Required methods
fn is_empty(&self) -> bool
Checks whether the queue is empty.
fn choose<R: Rng>(
&mut self,
rng: &mut R,
amount: usize,
batch_size: usize
) -> Vec<T>
&mut self,
rng: &mut R,
amount: usize,
batch_size: usize
) -> Vec<T>
Returns a new set of amount
transactions, randomly chosen from the first batch_size
.
No transactions are removed from the queue.
fn remove_multiple<'a, I>(&mut self, txs: I) where
I: IntoIterator<Item = &'a T>,
T: 'a + Contribution,
I: IntoIterator<Item = &'a T>,
T: 'a + Contribution,
Removes the given transactions from the queue.
Implementations on Foreign Types
impl<T> TransactionQueue<T> for Vec<T> where
T: Clone + Debug + Sync + Send,
[src]
T: Clone + Debug + Sync + Send,
fn is_empty(&self) -> bool
[src]
fn remove_multiple<'a, I>(&mut self, txs: I) where
I: IntoIterator<Item = &'a T>,
T: 'a + Contribution,
[src]
I: IntoIterator<Item = &'a T>,
T: 'a + Contribution,
fn choose<R: Rng>(
&mut self,
rng: &mut R,
amount: usize,
batch_size: usize
) -> Vec<T>
[src]
&mut self,
rng: &mut R,
amount: usize,
batch_size: usize
) -> Vec<T>