referrerpolicy=no-referrer-when-downgrade

Trait sp_runtime::traits::Checkable

source ·
pub trait Checkable<Context>: Sized {
    type Checked;

    // Required methods
    fn check(
        self,
        c: &Context,
    ) -> Result<Self::Checked, TransactionValidityError>;
    fn unchecked_into_checked_i_know_what_i_am_doing(
        self,
        c: &Context,
    ) -> Result<Self::Checked, TransactionValidityError>;
}
Expand description

Extract the digest type for a block. A “checkable” piece of information, used by the standard Substrate Executive in order to check the validity of a piece of extrinsic information, usually by verifying the signature. Implement for pieces of information that require some additional context Context in order to be checked.

Required Associated Types§

source

type Checked

Returned if check succeeds.

Required Methods§

source

fn check(self, c: &Context) -> Result<Self::Checked, TransactionValidityError>

Check self, given an instance of Context.

source

fn unchecked_into_checked_i_know_what_i_am_doing( self, c: &Context, ) -> Result<Self::Checked, TransactionValidityError>

Blindly check self.

§WARNING

DO NOT USE IN PRODUCTION. This is only meant to be used in testing environments. A runtime compiled with try-runtime should never be in production. Moreover, the name of this function is deliberately chosen to prevent developers from ever calling it in consensus code-paths.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<LookupSource, AccountId, Call, Signature, Extension, Lookup> Checkable<Lookup> for UncheckedExtrinsic<LookupSource, Call, Signature, Extension>
where LookupSource: Member + MaybeDisplay, Call: Encode + Member + Dispatchable, Signature: Member + Verify, <Signature as Verify>::Signer: IdentifyAccount<AccountId = AccountId>, Extension: Encode + TransactionExtension<Call>, AccountId: Member + MaybeDisplay, Lookup: Lookup<Source = LookupSource, Target = AccountId>,

§

type Checked = CheckedExtrinsic<AccountId, Call, Extension>

source§

impl<T: BlindCheckable, Context> Checkable<Context> for T