pub struct ScriptVerifier<DL> { /* private fields */ }
Expand description

Perform rules verification describe in CKB script, also check cycles limit

See:

Implementations§

source§

impl<DL: CellDataProvider + HeaderProvider + ExtensionProvider + Send + Sync + Clone + 'static> ScriptVerifier<DL>

source

pub fn new( resolved_transaction: Arc<ResolvedTransaction>, data_loader: DL, consensus: Arc<Consensus>, tx_env: Arc<TxVerifyEnv> ) -> Self

Creates a new ScriptVerifier

source

pub fn verify(&self, max_cycles: Cycle) -> Result<Cycle, Error>

Perform script verification

source

pub fn resumable_verify( &self, limit_cycles: Cycle ) -> Result<VerifyResult, Error>

Perform resumable script verification

source

pub fn resume_from_snap( &self, snapshot: &TransactionSnapshot, limit_cycles: Cycle ) -> Result<VerifyResult, Error>

Perform verification resume from snapshot

source

pub fn resume_from_state( &self, state: TransactionState, limit_cycles: Cycle ) -> Result<VerifyResult, Error>

Perform verification resume from snapshot

source

pub fn complete( &self, snapshot: &TransactionSnapshot, max_cycles: Cycle ) -> Result<Cycle, Error>

Perform complete verification

source

pub fn inner(&self) -> &TransactionScriptsVerifier<DL>

Explicitly dereferencing operation

Auto Trait Implementations§

§

impl<DL> !RefUnwindSafe for ScriptVerifier<DL>

§

impl<DL> Send for ScriptVerifier<DL>where DL: Send,

§

impl<DL> !Sync for ScriptVerifier<DL>

§

impl<DL> Unpin for ScriptVerifier<DL>where DL: Unpin,

§

impl<DL> !UnwindSafe for ScriptVerifier<DL>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> AsAny for Twhere T: Any,

source§

fn as_any(&self) -> &(dyn Any + 'static)

Cast to trait Any
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V