1
2
3
4
5
6
7
8
9
10
11
12
13
use support_common::config::{Config, Names};

use crate::bridge::{BridgeConfig, BridgeTask};

pub async fn handle_relay() -> color_eyre::Result<()> {
    tracing::info!(target: "darwinia-crab", "Start bridge darwinia-crab");
    // check config
    let _bridge_config: BridgeConfig = Config::restore(Names::BridgeDarwiniaCrab)?;
    let _task = BridgeTask::new().await?;
    loop {
        tokio::time::sleep(std::time::Duration::from_secs(1)).await;
    }
}