pub struct VerifyContext<'a, CS> { /* private fields */ }
Expand description
Context for context-dependent block verification
Implementations
sourceimpl<'a, CS: ChainStore<'a>> VerifyContext<'a, CS>
impl<'a, CS: ChainStore<'a>> VerifyContext<'a, CS>
Trait Implementations
sourceimpl<'a, CS: ChainStore<'a>> ConsensusProvider for VerifyContext<'a, CS>
impl<'a, CS: ChainStore<'a>> ConsensusProvider for VerifyContext<'a, CS>
sourcefn get_consensus(&self) -> &Consensus
fn get_consensus(&self) -> &Consensus
Returns the Consensus
.
sourceimpl<'a, CS: ChainStore<'a>> HeaderChecker for VerifyContext<'a, CS>
impl<'a, CS: ChainStore<'a>> HeaderChecker for VerifyContext<'a, CS>
sourcefn check_valid(&self, block_hash: &Byte32) -> Result<(), OutPointError>
fn check_valid(&self, block_hash: &Byte32) -> Result<(), OutPointError>
Check if header in main chain
sourceimpl<'a, CS: ChainStore<'a>> HeaderProvider for VerifyContext<'a, CS>
impl<'a, CS: ChainStore<'a>> HeaderProvider for VerifyContext<'a, CS>
sourcefn get_header(&self, hash: &Byte32) -> Option<HeaderView>
fn get_header(&self, hash: &Byte32) -> Option<HeaderView>
TODO(doc): @quake
sourcefn timestamp_and_parent(&self, block_hash: &Byte32) -> (u64, u64, Byte32)
fn timestamp_and_parent(&self, block_hash: &Byte32) -> (u64, u64, Byte32)
Return timestamp and block_number of the corresponding block_hash, and hash of parent block
sourcefn block_median_time(
&self,
block_hash: &Byte32,
median_block_count: usize
) -> u64
fn block_median_time(
&self,
block_hash: &Byte32,
median_block_count: usize
) -> u64
Return past block median time, including the timestamp of the given one
Auto Trait Implementations
impl<'a, CS> RefUnwindSafe for VerifyContext<'a, CS> where
CS: RefUnwindSafe,
impl<'a, CS> Send for VerifyContext<'a, CS> where
CS: Sync,
impl<'a, CS> Sync for VerifyContext<'a, CS> where
CS: Sync,
impl<'a, CS> Unpin for VerifyContext<'a, CS>
impl<'a, CS> UnwindSafe for VerifyContext<'a, CS> where
CS: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more