CLI refactoring

* [CLI] Make bridge definitions more complete

* [CLI] Refactor relay_headers_and_messages

Signed-off-by: Serban Iorga <serban@parity.io>
This commit is contained in:
Serban Iorga
2022-07-13 14:07:36 +03:00
committed by Bastian Köcher
parent ceefd1b05d
commit e1fd877b80
18 changed files with 1635 additions and 1365 deletions
@@ -21,7 +21,7 @@ use crate::cli::{
CliBridgeBase, MillauToRialtoCliBridge, MillauToRialtoParachainCliBridge,
RialtoToMillauCliBridge, WestendToMillauCliBridge,
},
SourceConnectionParams, TargetConnectionParams, TargetSigningParams,
chain_schema::*,
};
use bp_runtime::Chain as ChainBase;
use codec::Encode;
@@ -71,8 +71,8 @@ where
/// Initialize the bridge.
async fn init_bridge(data: InitBridge) -> anyhow::Result<()> {
let source_client = data.source.to_client::<Self::Source>().await?;
let target_client = data.target.to_client::<Self::Target>().await?;
let source_client = data.source.into_client::<Self::Source>().await?;
let target_client = data.target.into_client::<Self::Target>().await?;
let target_sign = data.target_sign.to_keypair::<Self::Target>()?;
let (spec_version, transaction_version) = target_client.simple_runtime_version().await?;