pub trait ProtocolUpdateBatchGenerator {
// Required methods
fn batch_name(&self) -> &str;
fn generate_batch(
self: Box<Self>,
store: &dyn SubstateDatabase,
) -> ProtocolUpdateBatch;
}
Expand description
Generate a batch of transactions to be committed atomically with a proof.
It should be assumed that the SubstateDatabase
has committed all previous batches.
This ensures that the update is deterministically continuable if the node shuts down
mid-update.
Required Methods§
Sourcefn batch_name(&self) -> &str
fn batch_name(&self) -> &str
The batch name should be kebab-case for consistency
Sourcefn generate_batch(
self: Box<Self>,
store: &dyn SubstateDatabase,
) -> ProtocolUpdateBatch
fn generate_batch( self: Box<Self>, store: &dyn SubstateDatabase, ) -> ProtocolUpdateBatch
Generates the content of the batch