hermes-test-components 0.1.0

Implementation of an IBC Relayer in Rust, as a library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use cgp::prelude::*;

#[derive_component(RelayerBackgroundRunnerComponent, RelayerBackgroundRunner<RelayDriver>)]
#[async_trait]
pub trait CanRunRelayerInBackground: Async + HasErrorType {
    type RunHandle<'a>: Send + Sync;

    /**
       Spawns the relayer as an async task to run in the background.
       This method should only be called once during test, or it may
       result in error.

       The background will keep running as long as the returned `RunHandle`
       is kept alive. If the relayer stops before the `RunHandle` is dropped,
       the relay driver may panic to cause the running test to fail.
    */
    async fn run_relayer_in_background(&self) -> Result<Self::RunHandle<'_>, Self::Error>;
}