pub struct VerifiableHeader { /* private fields */ }
Expand description
A Header and the fields which are used to do verification for its extra hash.
Implementations§
source§impl VerifiableHeader
impl VerifiableHeader
sourcepub fn new(
header: HeaderView,
uncles_hash: Byte32,
extension: Option<Bytes>,
parent_chain_root: HeaderDigest
) -> Self
pub fn new( header: HeaderView, uncles_hash: Byte32, extension: Option<Bytes>, parent_chain_root: HeaderDigest ) -> Self
Creates a new verifiable header.
sourcepub fn is_valid(&self, mmr_activated_epoch: EpochNumber) -> bool
pub fn is_valid(&self, mmr_activated_epoch: EpochNumber) -> bool
Checks if the current verifiable header is valid.
sourcepub fn header(&self) -> &HeaderView
pub fn header(&self) -> &HeaderView
Returns the header.
sourcepub fn uncles_hash(&self) -> Byte32
pub fn uncles_hash(&self) -> Byte32
Returns the uncles hash.
sourcepub fn parent_chain_root(&self) -> HeaderDigest
pub fn parent_chain_root(&self) -> HeaderDigest
Returns the chain root for its parent block.
sourcepub fn total_difficulty(&self) -> U256
pub fn total_difficulty(&self) -> U256
Returns the total difficulty.
Trait Implementations§
source§impl Clone for VerifiableHeader
impl Clone for VerifiableHeader
source§fn clone(&self) -> VerifiableHeader
fn clone(&self) -> VerifiableHeader
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 VerifiableHeader
impl Debug for VerifiableHeader
source§impl From<VerifiableHeader> for VerifiableHeader
impl From<VerifiableHeader> for VerifiableHeader
source§fn from(raw: VerifiableHeader) -> Self
fn from(raw: VerifiableHeader) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for VerifiableHeader
impl Send for VerifiableHeader
impl Sync for VerifiableHeader
impl Unpin for VerifiableHeader
impl UnwindSafe for VerifiableHeader
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