use tendermint_rpc::{MockClient, MockRequestMatcher};
use super::error::CosmosClientError;
use super::CosmosClient;
impl<C: MockRequestMatcher + Send + 'static> CosmosClient<MockClient<C>> {
pub fn new(request_matcher: C) -> Self {
let (client, driver) = MockClient::new(request_matcher);
let driver_handle = Some(tokio::spawn(async move {
driver.run().await.map_err(CosmosClientError::from)
}));
CosmosClient {
client,
driver_handle,
gas_info: None,
}
}
}