Skip to content

Commit

Permalink
rpc: Fix mock-client feature
Browse files Browse the repository at this point in the history
  • Loading branch information
romac committed Aug 8, 2024
1 parent f10a6f4 commit 54a959a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
6 changes: 5 additions & 1 deletion rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ websocket-client = [
"tokio/time",
"tracing"
]
mock-client = []
mock-client = [
"futures",
"tracing",
"tokio/macros"
]

[dependencies]
tendermint = { version = "0.39.0", default-features = false, path = "../tendermint" }
Expand Down
24 changes: 20 additions & 4 deletions rpc/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,31 @@
mod compat;
pub use compat::CompatMode;

#[cfg(any(feature = "http-client", feature = "websocket-client"))]
#[cfg(any(
feature = "http-client",
feature = "websocket-client",
feature = "mock-client"
))]
mod subscription;
#[cfg(any(feature = "http-client", feature = "websocket-client"))]
#[cfg(any(
feature = "http-client",
feature = "websocket-client",
feature = "mock-client"
))]
pub use subscription::{Subscription, SubscriptionClient};

#[cfg(any(feature = "http-client", feature = "websocket-client"))]
#[cfg(any(
feature = "http-client",
feature = "websocket-client",
feature = "mock-client"
))]
pub mod sync;

#[cfg(any(feature = "http-client", feature = "websocket-client"))]
#[cfg(any(
feature = "http-client",
feature = "websocket-client",
feature = "mock-client"
))]
mod transport;

#[cfg(feature = "http-client")]
Expand Down
6 changes: 5 additions & 1 deletion rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ mod prelude;

pub mod client;

#[cfg(any(feature = "http-client", feature = "websocket-client"))]
#[cfg(any(
feature = "http-client",
feature = "websocket-client",
feature = "mock-client"
))]
pub use client::{Client, Subscription, SubscriptionClient};
#[cfg(feature = "http-client")]
pub use client::{HttpClient, HttpClientUrl};
Expand Down

0 comments on commit 54a959a

Please sign in to comment.