From 46a7307de5abce9d76f8c7decb3d71333e54c73a 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 --- bridges/bin/millau/runtime/src/rialto_messages.rs | 2 +- bridges/bin/millau/runtime/src/rialto_parachain_messages.rs | 4 +--- bridges/bin/rialto-parachain/runtime/src/millau_messages.rs | 2 +- bridges/bin/rialto/runtime/src/millau_messages.rs | 2 +- bridges/primitives/messages/src/source_chain.rs | 4 ++++ 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bridges/bin/millau/runtime/src/rialto_messages.rs b/bridges/bin/millau/runtime/src/rialto_messages.rs index ccca4222f61d7..7054382b3852f 100644 --- a/bridges/bin/millau/runtime/src/rialto_messages.rs +++ b/bridges/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/bridges/bin/millau/runtime/src/rialto_parachain_messages.rs b/bridges/bin/millau/runtime/src/rialto_parachain_messages.rs index 6840b703f4f4d..f26e0d1006ae4 100644 --- a/bridges/bin/millau/runtime/src/rialto_parachain_messages.rs +++ b/bridges/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/bridges/bin/rialto-parachain/runtime/src/millau_messages.rs b/bridges/bin/rialto-parachain/runtime/src/millau_messages.rs index 136b4343c190f..96ff18810bcf4 100644 --- a/bridges/bin/rialto-parachain/runtime/src/millau_messages.rs +++ b/bridges/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/bridges/bin/rialto/runtime/src/millau_messages.rs b/bridges/bin/rialto/runtime/src/millau_messages.rs index 1267cbd06e29f..2de74f4c6b966 100644 --- a/bridges/bin/rialto/runtime/src/millau_messages.rs +++ b/bridges/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/bridges/primitives/messages/src/source_chain.rs b/bridges/primitives/messages/src/source_chain.rs index c03d303ee8417..5c6283a803602 100644 --- a/bridges/primitives/messages/src/source_chain.rs +++ b/bridges/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>;