pub struct PartialFuelBlockHeader {
pub application: FuelApplicationHeader<Empty>,
pub consensus: FuelConsensusHeader<Empty>,
pub metadata: Option<HeaderMetadata>,
}
Expand description
A partially complete fuel block header that doesn’t not have any generated fields because it has not been executed yet.
Fields§
§application: FuelApplicationHeader<Empty>
The application header.
consensus: FuelConsensusHeader<Empty>
The consensus header.
metadata: Option<HeaderMetadata>
Header Metadata
Implementations§
source§impl PartialFuelBlockHeader
impl PartialFuelBlockHeader
sourcepub fn height(&self) -> &BlockHeight
pub fn height(&self) -> &BlockHeight
Fuel block height.
sourcepub fn consensus_type(&self) -> ConsensusType
pub fn consensus_type(&self) -> ConsensusType
The type of consensus this header is using.
source§impl PartialFuelBlockHeader
impl PartialFuelBlockHeader
sourcepub fn generate(
self,
transactions: &[Vec<u8>],
message_ids: &[MessageId]
) -> FuelBlockHeader
pub fn generate(
self,
transactions: &[Vec<u8>],
message_ids: &[MessageId]
) -> FuelBlockHeader
Generate all fields to create a full FuelBlockHeader
after running the transactions.
The order of the transactions must be the same order they were executed in. 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.
The transactions are the bytes of the executed [Transaction
]s.
Trait Implementations§
source§impl AsRef<FuelConsensusHeader<Empty>> for PartialFuelBlockHeader
impl AsRef<FuelConsensusHeader<Empty>> for PartialFuelBlockHeader
source§fn as_ref(&self) -> &FuelConsensusHeader<Empty>
fn as_ref(&self) -> &FuelConsensusHeader<Empty>
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for PartialFuelBlockHeader
impl Clone for PartialFuelBlockHeader
source§fn clone(&self) -> PartialFuelBlockHeader
fn clone(&self) -> PartialFuelBlockHeader
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