mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
Message dispatch support multiple instances (#942)
* message dispatch support multiple instances * format code * define millau grandpa instance in rialto
This commit is contained in:
@@ -436,6 +436,7 @@ parameter_types! {
|
||||
pub const HeadersToKeep: u32 = 7 * bp_rialto::DAYS as u32;
|
||||
}
|
||||
|
||||
pub type MillauGrandpaInstance = ();
|
||||
impl pallet_bridge_grandpa::Config for Runtime {
|
||||
type BridgedChain = bp_millau::Millau;
|
||||
type MaxRequests = MaxRequests;
|
||||
|
||||
@@ -214,7 +214,9 @@ impl TargetHeaderChain<ToMillauMessagePayload, bp_millau::AccountId> for Millau
|
||||
fn verify_messages_delivery_proof(
|
||||
proof: Self::MessagesDeliveryProof,
|
||||
) -> Result<(LaneId, InboundLaneData<bp_rialto::AccountId>), Self::Error> {
|
||||
messages::source::verify_messages_delivery_proof::<WithMillauMessageBridge, Runtime>(proof)
|
||||
messages::source::verify_messages_delivery_proof::<WithMillauMessageBridge, Runtime, crate::MillauGrandpaInstance>(
|
||||
proof,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,7 +233,10 @@ impl SourceHeaderChain<bp_millau::Balance> for Millau {
|
||||
proof: Self::MessagesProof,
|
||||
messages_count: u32,
|
||||
) -> Result<ProvedMessages<Message<bp_millau::Balance>>, Self::Error> {
|
||||
messages::target::verify_messages_proof::<WithMillauMessageBridge, Runtime>(proof, messages_count)
|
||||
messages::target::verify_messages_proof::<WithMillauMessageBridge, Runtime, crate::MillauGrandpaInstance>(
|
||||
proof,
|
||||
messages_count,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user