Struct chik_protocol::header_block::HeaderBlock
source · pub struct HeaderBlock {
pub finished_sub_slots: Vec<EndOfSubSlotBundle>,
pub reward_chain_block: RewardChainBlock,
pub challenge_chain_sp_proof: Option<VDFProof>,
pub challenge_chain_ip_proof: VDFProof,
pub reward_chain_sp_proof: Option<VDFProof>,
pub reward_chain_ip_proof: VDFProof,
pub infused_challenge_chain_ip_proof: Option<VDFProof>,
pub foliage: Foliage,
pub foliage_transaction_block: Option<FoliageTransactionBlock>,
pub transactions_filter: Bytes,
pub transactions_info: Option<TransactionsInfo>,
}Fields§
§finished_sub_slots: Vec<EndOfSubSlotBundle>§reward_chain_block: RewardChainBlock§challenge_chain_sp_proof: Option<VDFProof>§challenge_chain_ip_proof: VDFProof§reward_chain_sp_proof: Option<VDFProof>§reward_chain_ip_proof: VDFProof§infused_challenge_chain_ip_proof: Option<VDFProof>§foliage: Foliage§foliage_transaction_block: Option<FoliageTransactionBlock>§transactions_filter: Bytes§transactions_info: Option<TransactionsInfo>Implementations§
source§impl HeaderBlock
impl HeaderBlock
pub fn new( finished_sub_slots: Vec<EndOfSubSlotBundle>, reward_chain_block: RewardChainBlock, challenge_chain_sp_proof: Option<VDFProof>, challenge_chain_ip_proof: VDFProof, reward_chain_sp_proof: Option<VDFProof>, reward_chain_ip_proof: VDFProof, infused_challenge_chain_ip_proof: Option<VDFProof>, foliage: Foliage, foliage_transaction_block: Option<FoliageTransactionBlock>, transactions_filter: Bytes, transactions_info: Option<TransactionsInfo> ) -> HeaderBlock
source§impl HeaderBlock
impl HeaderBlock
pub fn prev_header_hash(&self) -> Bytes32
pub fn prev_hash(&self) -> Bytes32
pub fn height(&self) -> u32
pub fn weight(&self) -> u128
pub fn header_hash(&self) -> Bytes32
pub fn total_iters(&self) -> u128
pub fn log_string(&self) -> String
pub fn is_transaction_block(&self) -> bool
pub fn first_in_sub_slot(&self) -> bool
Trait Implementations§
source§impl Clone for HeaderBlock
impl Clone for HeaderBlock
source§fn clone(&self) -> HeaderBlock
fn clone(&self) -> HeaderBlock
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 HeaderBlock
impl Debug for HeaderBlock
source§impl Hash for HeaderBlock
impl Hash for HeaderBlock
source§impl PartialEq for HeaderBlock
impl PartialEq for HeaderBlock
source§fn eq(&self, other: &HeaderBlock) -> bool
fn eq(&self, other: &HeaderBlock) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Streamable for HeaderBlock
impl Streamable for HeaderBlock
fn update_digest(&self, digest: &mut Sha256)
fn stream(&self, out: &mut Vec<u8>) -> Result<()>
fn parse<const TRUSTED: bool>(input: &mut Cursor<&[u8]>) -> Result<Self>
fn to_bytes(&self) -> Result<Vec<u8>, Error>
fn from_bytes(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn from_bytes_unchecked(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn hash(&self) -> [u8; 32]
impl Eq for HeaderBlock
impl StructuralPartialEq for HeaderBlock
Auto Trait Implementations§
impl Freeze for HeaderBlock
impl RefUnwindSafe for HeaderBlock
impl Send for HeaderBlock
impl Sync for HeaderBlock
impl Unpin for HeaderBlock
impl UnwindSafe for HeaderBlock
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