mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 15:41:02 +00:00
CLI: Relay Messages (#858)
* Relay Messages. * Fix docs. * Fix copyright date. * copyright increment Co-authored-by: adoerr <0xad@gmx.net>
This commit is contained in:
committed by
Bastian Köcher
parent
025a9cad59
commit
da3f94d99f
@@ -27,6 +27,7 @@ use structopt::{clap::arg_enum, StructOpt};
|
||||
|
||||
mod init_bridge;
|
||||
mod relay_headers;
|
||||
mod relay_messages;
|
||||
|
||||
/// Parse relay CLI args.
|
||||
pub fn parse_args() -> Command {
|
||||
@@ -46,7 +47,7 @@ pub enum Command {
|
||||
///
|
||||
/// Ties up to `Messages` pallets on both chains and starts relaying messages.
|
||||
/// Requires the header relay to be already running.
|
||||
RelayMessages(RelayMessages),
|
||||
RelayMessages(relay_messages::RelayMessages),
|
||||
/// Initialize on-chain bridge pallet with current header data.
|
||||
///
|
||||
/// Sends initialization transaction to bootstrap the bridge with current finalized block data.
|
||||
@@ -90,23 +91,6 @@ impl Command {
|
||||
}
|
||||
}
|
||||
|
||||
/// Start message relayer process.
|
||||
#[derive(StructOpt)]
|
||||
pub enum RelayMessages {
|
||||
#[structopt(flatten)]
|
||||
RialtoMillau(rialto_millau::RelayMessages),
|
||||
}
|
||||
|
||||
impl RelayMessages {
|
||||
/// Run the command.
|
||||
pub async fn run(self) -> anyhow::Result<()> {
|
||||
match self {
|
||||
Self::RialtoMillau(arg) => arg.run().await?,
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
/// Send bridge message.
|
||||
#[derive(StructOpt)]
|
||||
pub enum SendMessage {
|
||||
|
||||
Reference in New Issue
Block a user