Struct fuel_core_interfaces::model::PartialFuelBlock
source · pub struct PartialFuelBlock {
pub header: PartialFuelBlockHeader,
pub transactions: Vec<Transaction>,
}
Expand description
Fuel block with all transaction data included
but without any data generated.
This type can be created with unexecuted
transactions to produce a FuelBlock
or
it can be created with pre-executed transactions in
order to validate they were constructed correctly.
Fields§
§header: PartialFuelBlockHeader
The partial header.
transactions: Vec<Transaction>
Transactions that can either be pre-executed or not.
Implementations§
source§impl PartialFuelBlock
impl PartialFuelBlock
pub fn new(
header: PartialFuelBlockHeader,
transactions: Vec<Transaction>
) -> Self
sourcepub fn to_partial_db_block(&self) -> FuelBlockDb
pub fn to_partial_db_block(&self) -> FuelBlockDb
Creates a FuelBlockDb
that has the
generated fields set to meaningless values.
Hack until we figure out a better way to represent a block in the database that hasn’t been run.
sourcepub fn generate(self, message_ids: &[MessageId]) -> FuelBlock
pub fn generate(self, message_ids: &[MessageId]) -> FuelBlock
Generate a FuelBlock
after running this partial block.
The order of the messages must be the same as they were produced in.
Message ids are produced by executed the transactions and collecting the ids from the receipts of messages outputs.
Trait Implementations§
source§impl Clone for PartialFuelBlock
impl Clone for PartialFuelBlock
source§fn clone(&self) -> PartialFuelBlock
fn clone(&self) -> PartialFuelBlock
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more