Trait BatchBuilder
Source pub trait BatchBuilder {
// Required methods
fn accept_tx(&mut self, tx: Vec<u8>) -> Result<()>;
fn get_next_blob(&mut self) -> Result<Vec<Vec<u8>>>;
}
Expand description
BlockBuilder trait is responsible for managing mempool and building batches.
Accept a new transaction.
Can return error if transaction is invalid or mempool is full.
Builds a new batch out of transactions in mempool.
Logic of which transactions and how many of them is included in batch is up to implementation.