From 5c91941ca15e7f4ece4539952d0a15ef81bea9a4 Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky Date: Tue, 4 Oct 2022 11:44:38 +0300 Subject: [PATCH] Use proper account types (#1591) * use proper account types * Update primitives/messages/src/source_chain.rs Co-authored-by: Branislav Kontur Co-authored-by: Branislav Kontur --- bin/millau/runtime/src/rialto_messages.rs | 2 +- bin/millau/runtime/src/rialto_parachain_messages.rs | 4 +--- bin/rialto-parachain/runtime/src/millau_messages.rs | 2 +- bin/rialto/runtime/src/millau_messages.rs | 2 +- primitives/messages/src/source_chain.rs | 4 ++++ 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bin/millau/runtime/src/rialto_messages.rs b/bin/millau/runtime/src/rialto_messages.rs index ccca4222f61d..7054382b3852 100644 --- a/bin/millau/runtime/src/rialto_messages.rs +++ b/bin/millau/runtime/src/rialto_messages.rs @@ -236,7 +236,7 @@ impl messages::BridgedChainWithMessages for Rialto { } } -impl TargetHeaderChain for Rialto { +impl TargetHeaderChain for Rialto { type Error = &'static str; // The proof is: // - hash of the header this proof has been created with; diff --git a/bin/millau/runtime/src/rialto_parachain_messages.rs b/bin/millau/runtime/src/rialto_parachain_messages.rs index 6840b703f4f4..f26e0d1006ae 100644 --- a/bin/millau/runtime/src/rialto_parachain_messages.rs +++ b/bin/millau/runtime/src/rialto_parachain_messages.rs @@ -229,9 +229,7 @@ impl messages::BridgedChainWithMessages for RialtoParachain { } } -impl TargetHeaderChain - for RialtoParachain -{ +impl TargetHeaderChain for RialtoParachain { type Error = &'static str; // The proof is: // - hash of the header this proof has been created with; diff --git a/bin/rialto-parachain/runtime/src/millau_messages.rs b/bin/rialto-parachain/runtime/src/millau_messages.rs index 136b4343c190..96ff18810bcf 100644 --- a/bin/rialto-parachain/runtime/src/millau_messages.rs +++ b/bin/rialto-parachain/runtime/src/millau_messages.rs @@ -243,7 +243,7 @@ impl messages::BridgedChainWithMessages for Millau { } } -impl TargetHeaderChain for Millau { +impl TargetHeaderChain for Millau { type Error = &'static str; // The proof is: // - hash of the header this proof has been created with; diff --git a/bin/rialto/runtime/src/millau_messages.rs b/bin/rialto/runtime/src/millau_messages.rs index 1267cbd06e29..2de74f4c6b96 100644 --- a/bin/rialto/runtime/src/millau_messages.rs +++ b/bin/rialto/runtime/src/millau_messages.rs @@ -233,7 +233,7 @@ impl messages::BridgedChainWithMessages for Millau { } } -impl TargetHeaderChain for Millau { +impl TargetHeaderChain for Millau { type Error = &'static str; // The proof is: // - hash of the header this proof has been created with; diff --git a/primitives/messages/src/source_chain.rs b/primitives/messages/src/source_chain.rs index c03d303ee841..5c6283a80360 100644 --- a/primitives/messages/src/source_chain.rs +++ b/primitives/messages/src/source_chain.rs @@ -61,6 +61,10 @@ pub struct RelayerRewards { /// All implementations of this trait should only work with finalized data that /// can't change. Wrong implementation may lead to invalid lane states (i.e. lane /// that's stuck) and/or processing messages without paying fees. +/// +/// The `Payload` type here means the payload of the message that is sent from the +/// source chain to the target chain. The `AccountId` type here means the account +/// type used by the source chain. pub trait TargetHeaderChain { /// Error type. type Error: Debug + Into<&'static str>;