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 moreSource§impl Debug for PartialFuelBlock
impl Debug for PartialFuelBlock
Auto Trait Implementations§
impl Freeze for PartialFuelBlock
impl RefUnwindSafe for PartialFuelBlock
impl Send for PartialFuelBlock
impl Sync for PartialFuelBlock
impl Unpin for PartialFuelBlock
impl UnwindSafe for PartialFuelBlock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more