(
http_url: Url,
ws_url: WebSocketClientUrl,
retry_delay: Duration,
)
| 45 | |
| 46 | impl HybridClient { |
| 47 | pub fn new( |
| 48 | http_url: Url, |
| 49 | ws_url: WebSocketClientUrl, |
| 50 | retry_delay: Duration, |
| 51 | ) -> anyhow::Result<(Self, HybridClientDriver)> { |
| 52 | let http_client = |
| 53 | http_client(http_url, None).context("failed to create Tendermint client")?; |
| 54 | |
| 55 | let (cmd_tx, cmd_rx) = tokio::sync::mpsc::unbounded_channel(); |
| 56 | |
| 57 | let client = Self { |
| 58 | http_client, |
| 59 | cmd_tx, |
| 60 | }; |
| 61 | |
| 62 | let driver = HybridClientDriver { |
| 63 | ws_url, |
| 64 | retry_delay, |
| 65 | cmd_rx, |
| 66 | }; |
| 67 | |
| 68 | Ok((client, driver)) |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | #[async_trait] |
nothing calls this directly
no test coverage detected