referrerpolicy=no-referrer-when-downgrade

Trait pallet_bridge_grandpa::CallSubType

source ·
pub trait CallSubType<T: Config<I, RuntimeCall = Self>, I: 'static>: IsSubType<CallableCallFor<Pallet<T, I>, T>> {
    // Provided methods
    fn submit_finality_proof_info(
        &self,
    ) -> Option<SubmitFinalityProofInfo<BridgedBlockNumber<T, I>>> { ... }
    fn check_obsolete_submit_finality_proof(
        &self,
    ) -> Result<Option<VerifiedSubmitFinalityProofInfo<BridgedBlockNumber<T, I>>>, TransactionValidityError>
       where Self: Sized { ... }
}
Expand description

Trait representing a call that is a sub type of this pallet’s call.

Provided Methods§

source

fn submit_finality_proof_info( &self, ) -> Option<SubmitFinalityProofInfo<BridgedBlockNumber<T, I>>>

Extract finality proof info from a runtime call.

source

fn check_obsolete_submit_finality_proof( &self, ) -> Result<Option<VerifiedSubmitFinalityProofInfo<BridgedBlockNumber<T, I>>>, TransactionValidityError>
where Self: Sized,

Validate Grandpa headers in order to avoid “mining” transactions that provide outdated bridged chain headers. Without this validation, even honest relayers may lose their funds if there are multiple relays running and submitting the same information.

Returns Ok(None) if the call is not the submit_finality_proof call of our pallet. Returns Ok(Some(_)) if the call is the submit_finality_proof call of our pallet and we believe the call brings header that improves the pallet state. Returns Err(_) if the call is the submit_finality_proof call of our pallet and we believe that the call will fail.

Implementors§

source§

impl<T: Config<I>, I: 'static> CallSubType<T, I> for T::RuntimeCall
where T::RuntimeCall: IsSubType<CallableCallFor<Pallet<T, I>, T>>,