Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpc: Make rpc::Client and SubscriptionClient traits ?Send under wasm32 target #1386

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Support for Secp256k1 consensus keys has been added as an optional feature.
- `[tendermint-rpc]` Turn non-200 HTTP response into an error
instead of trying to parse the body as a JSON-RPC response
([\#1359](https://github.com/informalsystems/tendermint-rs/issues/1359))
- `[tendermint-rpc]` Make `rpc::Client` and `SubscriptionClient` traits `?Send` under `wasm32` target.
([\#1385](https://github.com/informalsystems/tendermint-rs/issues/1385))

### SECURITY

Expand Down
3 changes: 2 additions & 1 deletion rpc/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ use crate::{
/// [`SubscriptionClient`] trait.
///
/// [`SubscriptionClient`]: trait.SubscriptionClient.html
#[async_trait]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait Client {
/// `/abci_info`: get information about the ABCI application.
async fn abci_info(&self) -> Result<abci::response::Info, Error> {
Expand Down
3 changes: 2 additions & 1 deletion rpc/src/client/subscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ use crate::{

/// A client that exclusively provides [`Event`] subscription capabilities,
/// without any other RPC method support.
#[async_trait]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait SubscriptionClient {
/// `/subscribe`: subscribe to receive events produced by the given query.
async fn subscribe(&self, query: Query) -> Result<Subscription, Error>;
Expand Down
Loading