diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8289041a31..ae092449f9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -261,7 +261,7 @@ jobs: uses: actions-rs/cargo@v1.0.3 with: command: test - args: --doc --features unstable-reconnecting-rpc-client + args: --doc --features reconnecting-rpc-client - if: "failure()" uses: "andymckay/cancel-action@a955d435292c0d409d104b57d8e78435a93a6ef1" # v0.5 @@ -295,7 +295,7 @@ jobs: uses: actions-rs/cargo@v1.0.3 with: command: nextest - args: run --workspace --features unstable-reconnecting-rpc-client + args: run --workspace --features reconnecting-rpc-client - if: "failure()" uses: "andymckay/cancel-action@a955d435292c0d409d104b57d8e78435a93a6ef1" # v0.5 diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index 35da47c543..23ebc63968 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -56,7 +56,7 @@ web = [ runtime = ["tokio/rt", "wasm-bindgen-futures"] # Enable this to use the reconnecting rpc client -unstable-reconnecting-rpc-client = ["dep:finito", "jsonrpsee"] +reconnecting-rpc-client = ["dep:finito", "jsonrpsee"] # Enable this to use jsonrpsee (allowing for example `OnlineClient::from_url`). jsonrpsee = [ @@ -165,7 +165,7 @@ required-features = ["unstable-light-client", "jsonrpsee", "native"] [[example]] name = "setup_reconnecting_rpc_client" path = "examples/setup_reconnecting_rpc_client.rs" -required-features = ["unstable-reconnecting-rpc-client"] +required-features = ["reconnecting-rpc-client"] [package.metadata.docs.rs] features = ["default", "substrate-compat", "unstable-light-client"] diff --git a/subxt/examples/setup_reconnecting_rpc_client.rs b/subxt/examples/setup_reconnecting_rpc_client.rs index 42485161bf..58ceea74ed 100644 --- a/subxt/examples/setup_reconnecting_rpc_client.rs +++ b/subxt/examples/setup_reconnecting_rpc_client.rs @@ -1,5 +1,5 @@ //! Example to utilize the `reconnecting rpc client` in subxt -//! which hidden behind behind `--feature unstable-reconnecting-rpc-client` +//! which hidden behind behind `--feature reconnecting-rpc-client` //! //! To utilize full logs from the RPC client use: //! `RUST_LOG="jsonrpsee=trace,subxt-reconnecting-rpc-client=trace"` diff --git a/subxt/src/macros.rs b/subxt/src/macros.rs index 84cad40d2c..4094d353fb 100644 --- a/subxt/src/macros.rs +++ b/subxt/src/macros.rs @@ -56,8 +56,8 @@ macro_rules! cfg_jsonrpsee_web { macro_rules! cfg_reconnecting_rpc_client { ($($item:item)*) => { $( - #[cfg(all(feature = "unstable-reconnecting-rpc-client", any(feature = "native", feature = "web")))] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-reconnecting-rpc-client")))] + #[cfg(all(feature = "reconnecting-rpc-client", any(feature = "native", feature = "web")))] + #[cfg_attr(docsrs, doc(cfg(feature = "reconnecting-rpc-client")))] $item )* } diff --git a/testing/integration-tests/Cargo.toml b/testing/integration-tests/Cargo.toml index 8680b3b9c4..7037a99ebf 100644 --- a/testing/integration-tests/Cargo.toml +++ b/testing/integration-tests/Cargo.toml @@ -36,7 +36,7 @@ serde = { workspace = true } scale-info = { workspace = true, features = ["bit-vec"] } sp-core = { workspace = true } syn = { workspace = true } -subxt = { workspace = true, features = ["unstable-metadata", "native", "jsonrpsee", "substrate-compat", "unstable-reconnecting-rpc-client"] } +subxt = { workspace = true, features = ["unstable-metadata", "native", "jsonrpsee", "substrate-compat", "reconnecting-rpc-client"] } subxt-signer = { workspace = true, features = ["default"] } subxt-codegen = { workspace = true } subxt-metadata = { workspace = true } diff --git a/testing/integration-tests/src/utils/context.rs b/testing/integration-tests/src/utils/context.rs index 7542a0dac4..bcab4c729a 100644 --- a/testing/integration-tests/src/utils/context.rs +++ b/testing/integration-tests/src/utils/context.rs @@ -35,5 +35,5 @@ pub async fn test_context() -> TestContext { } pub async fn test_context_reconnecting_rpc_client() -> TestContext { - test_context_with("alice".to_string(), RpcClientKind::UnstableReconnecting).await + test_context_with("alice".to_string(), RpcClientKind::Reconnecting).await } diff --git a/testing/integration-tests/src/utils/node_proc.rs b/testing/integration-tests/src/utils/node_proc.rs index 65cf0586a4..2b374aa50e 100644 --- a/testing/integration-tests/src/utils/node_proc.rs +++ b/testing/integration-tests/src/utils/node_proc.rs @@ -16,7 +16,7 @@ use subxt::{ // The URL that we'll connect to for our tests comes from SUBXT_TEXT_HOST env var, // defaulting to localhost if not provided. If the env var is set, we won't spawn // a binary. Note though that some tests expect and modify a fresh state, and so will -// fail. Fo a similar reason wyou should also use `--test-threads 1` when running tests +// fail. For a similar reason you should also use `--test-threads 1` when running tests // to reduce the number of conflicts between state altering tests. const URL_ENV_VAR: &str = "SUBXT_TEST_URL"; fn is_url_provided() -> bool { @@ -124,7 +124,7 @@ where /// Kind of rpc client to use in tests pub enum RpcClientKind { Legacy, - UnstableReconnecting, + Reconnecting, } /// Construct a test node process. @@ -153,7 +153,7 @@ impl TestNodeProcessBuilder { } } - /// Set the testRunner to use a preferred RpcClient impl, ie Legacy or Unstable + /// Set the testRunner to use a preferred RpcClient impl, ie Legacy or Reconnecting. pub fn with_rpc_client_kind(&mut self, rpc_client_kind: RpcClientKind) -> &mut Self { self.rpc_client = rpc_client_kind; self @@ -187,7 +187,7 @@ impl TestNodeProcessBuilder { let ws_url = get_url(proc.as_ref().map(|p| p.ws_port())); let rpc_client = match self.rpc_client { RpcClientKind::Legacy => build_rpc_client(&ws_url).await, - RpcClientKind::UnstableReconnecting => build_reconnecting_rpc_client(&ws_url).await, + RpcClientKind::Reconnecting => build_reconnecting_rpc_client(&ws_url).await, } .map_err(|e| format!("Failed to connect to node at {ws_url}: {e}"))?; diff --git a/testing/wasm-rpc-tests/Cargo.toml b/testing/wasm-rpc-tests/Cargo.toml index 597acd93e6..9e50d23cd6 100644 --- a/testing/wasm-rpc-tests/Cargo.toml +++ b/testing/wasm-rpc-tests/Cargo.toml @@ -15,4 +15,4 @@ futures-util = "0.3.30" # This crate is not a part of the workspace, because it # requires the "jsonrpsee web" features to be enabled, which we don't # want enabled for workspace builds in general. -subxt = { path = "../../subxt", default-features = false, features = ["web", "jsonrpsee", "unstable-reconnecting-rpc-client", "runtime"] } \ No newline at end of file +subxt = { path = "../../subxt", default-features = false, features = ["web", "jsonrpsee", "reconnecting-rpc-client"] }