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

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

See:

Implementations§

source§

impl<'a, DL: CellDataProvider + HeaderProvider> ScriptVerifier<'a, DL>

source

pub fn new(
    resolved_transaction: &'a ResolvedTransaction,
    data_loader: &'a DL
) -> 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<'a>,
    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<'a, DL>

Explicitly dereferencing operation

Auto Trait Implementations§

§

impl<'a, DL> !RefUnwindSafe for ScriptVerifier<'a, DL>

§

impl<'a, DL> !Send for ScriptVerifier<'a, DL>

§

impl<'a, DL> !Sync for ScriptVerifier<'a, DL>

§

impl<'a, DL> Unpin for ScriptVerifier<'a, DL>

§

impl<'a, DL> !UnwindSafe for ScriptVerifier<'a, 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)

TODO(doc): @quake
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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.
const: unstable · 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.
const: unstable · 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