pub struct TxVerifyEnv { /* private fields */ }
Expand description
The environment that transactions are in.
Implementations§
Source§impl TxVerifyEnv
impl TxVerifyEnv
Sourcepub fn new_submit(header: &HeaderView) -> Self
pub fn new_submit(header: &HeaderView) -> Self
The transaction has just been submitted.
The input is current tip header.
Sourcepub fn new_proposed(header: &HeaderView, n_blocks: BlockNumber) -> Self
pub fn new_proposed(header: &HeaderView, n_blocks: BlockNumber) -> Self
The transaction has already been proposed before several blocks.
The input is current tip header and how many blocks have been passed since the transaction was proposed.
Sourcepub fn new_commit(header: &HeaderView) -> Self
pub fn new_commit(header: &HeaderView) -> Self
The transaction will committed in current block.
The input is current tip header.
Sourcepub fn block_number(&self, proposal_window: ProposalWindow) -> BlockNumber
pub fn block_number(&self, proposal_window: ProposalWindow) -> BlockNumber
The block number of the earliest block which the transaction will committed in.
Sourcepub fn epoch_number(&self, proposal_window: ProposalWindow) -> EpochNumber
pub fn epoch_number(&self, proposal_window: ProposalWindow) -> EpochNumber
The epoch number of the earliest epoch which the transaction will committed in.
Sourcepub fn parent_hash(&self) -> Byte32
pub fn parent_hash(&self) -> Byte32
The parent block hash of the earliest block which the transaction will committed in.
Sourcepub fn epoch(&self) -> EpochNumberWithFraction
pub fn epoch(&self) -> EpochNumberWithFraction
The earliest epoch which the transaction will committed in.
Sourcepub fn epoch_number_without_proposal_window(&self) -> EpochNumber
pub fn epoch_number_without_proposal_window(&self) -> EpochNumber
The epoch number of the earliest epoch which the transaction will committed in without consider about the proposal window.
Trait Implementations§
Source§impl Clone for TxVerifyEnv
impl Clone for TxVerifyEnv
Source§fn clone(&self) -> TxVerifyEnv
fn clone(&self) -> TxVerifyEnv
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl !Freeze for TxVerifyEnv
impl RefUnwindSafe for TxVerifyEnv
impl Send for TxVerifyEnv
impl Sync for TxVerifyEnv
impl Unpin for TxVerifyEnv
impl UnwindSafe for TxVerifyEnv
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more