pub struct ContextualTransactionVerifier<DL>{ /* private fields */ }
Expand description
Context-dependent verification checks for transaction
Contains:
CompatibleVerifier
TimeRelativeTransactionVerifier
CapacityVerifier
ScriptVerifier
FeeCalculator
Implementations§
Source§impl<DL> ContextualTransactionVerifier<DL>where
DL: CellDataProvider + HeaderProvider + ExtensionProvider + HeaderFieldsProvider + EpochProvider + Send + Sync + Clone + 'static,
impl<DL> ContextualTransactionVerifier<DL>where
DL: CellDataProvider + HeaderProvider + ExtensionProvider + HeaderFieldsProvider + EpochProvider + Send + Sync + Clone + 'static,
Sourcepub fn new(
rtx: Arc<ResolvedTransaction>,
consensus: Arc<Consensus>,
data_loader: DL,
tx_env: Arc<TxVerifyEnv>,
) -> Self
pub fn new( rtx: Arc<ResolvedTransaction>, consensus: Arc<Consensus>, data_loader: DL, tx_env: Arc<TxVerifyEnv>, ) -> Self
Creates a new ContextualTransactionVerifier
Sourcepub fn verify(
&self,
max_cycles: Cycle,
skip_script_verify: bool,
) -> Result<Completed, Error>
pub fn verify( &self, max_cycles: Cycle, skip_script_verify: bool, ) -> Result<Completed, Error>
Perform context-dependent verification, return a Result
to CacheEntry
skip script verify will result in the return value cycle always is zero
Sourcepub async fn verify_with_pause(
&self,
max_cycles: Cycle,
command_rx: &mut Receiver<ChunkCommand>,
) -> Result<Completed, Error>
pub async fn verify_with_pause( &self, max_cycles: Cycle, command_rx: &mut Receiver<ChunkCommand>, ) -> Result<Completed, Error>
Perform context-dependent verification with command The verification will be interrupted when receiving a Suspend command
Auto Trait Implementations§
impl<DL> !Freeze for ContextualTransactionVerifier<DL>
impl<DL> !RefUnwindSafe for ContextualTransactionVerifier<DL>
impl<DL> Send for ContextualTransactionVerifier<DL>
impl<DL> Sync for ContextualTransactionVerifier<DL>
impl<DL> Unpin for ContextualTransactionVerifier<DL>where
DL: Unpin,
impl<DL> !UnwindSafe for ContextualTransactionVerifier<DL>
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
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>
Converts
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>
Converts
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