mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 00:31:02 +00:00
extract common relay initialization func (#392)
This commit is contained in:
committed by
Bastian Köcher
parent
fe2d786f13
commit
52b11a58c9
@@ -8,15 +8,19 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||
[dependencies]
|
||||
async-std = "1.6.2"
|
||||
async-trait = "0.1.41"
|
||||
bp-rialto = { path = "../../primitives/rialto" }
|
||||
codec = { package = "parity-scale-codec", version = "1.3.4" }
|
||||
futures = "0.3.5"
|
||||
headers-relay = { path = "../headers-relay" }
|
||||
log = "0.4.11"
|
||||
messages-relay = { path = "../messages-relay" }
|
||||
paste = "1.0"
|
||||
sp-runtime = "2.0"
|
||||
structopt = "0.3"
|
||||
|
||||
# Bridge dependencies
|
||||
|
||||
bp-rialto = { path = "../../primitives/rialto" }
|
||||
headers-relay = { path = "../headers-relay" }
|
||||
messages-relay = { path = "../messages-relay" }
|
||||
relay-millau-client = { path = "../millau-client" }
|
||||
relay-rialto-client = { path = "../rialto-client" }
|
||||
relay-substrate-client = { path = "../substrate-client" }
|
||||
sp-runtime = "2.0"
|
||||
structopt = "0.3"
|
||||
relay-utils = { path = "../utils" }
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
use relay_rialto_client::SigningParams as RialtoSigningParams;
|
||||
use relay_substrate_client::ConnectionParams;
|
||||
use relay_utils::initialize::initialize_relay;
|
||||
|
||||
/// Millau node client.
|
||||
pub type MillauClient = relay_substrate_client::Client<relay_millau_client::Millau>;
|
||||
@@ -30,6 +31,8 @@ mod cli;
|
||||
mod millau_headers_to_rialto;
|
||||
|
||||
fn main() {
|
||||
initialize_relay();
|
||||
|
||||
let result = async_std::task::block_on(run_command(cli::parse_args()));
|
||||
if let Err(error) = result {
|
||||
log::error!(target: "bridge", "Failed to start relay: {}", error);
|
||||
@@ -58,7 +61,7 @@ async fn run_command(command: cli::Command) -> Result<(), String> {
|
||||
rialto_sign.rialto_signer_password.as_deref(),
|
||||
)
|
||||
.map_err(|e| format!("Failed to parse rialto-signer: {:?}", e))?;
|
||||
millau_headers_to_rialto::run(millau_client, rialto_client, rialto_sign)
|
||||
millau_headers_to_rialto::run(millau_client, rialto_client, rialto_sign);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user