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 · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more