Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Rename system_networkState to system_unstable_networkState #8001

Merged
1 commit merged into from
Feb 2, 2021
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
4 changes: 2 additions & 2 deletions bin/node/cli/browser-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

setInterval(() => {
client
.rpcSend('{"method":"system_networkState","params":[],"id":1,"jsonrpc":"2.0"}')
.then((r) => log("Network state: " + r));
.rpcSend('{"method":"system_localPeerId","params":[],"id":1,"jsonrpc":"2.0"}')
.then((r) => log("Local PeerId: " + r));
}, 20000);
}

Expand Down
8 changes: 5 additions & 3 deletions client/rpc-api/src/system/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ pub trait SystemApi<Hash, Number> {

/// Returns current state of the network.
///
/// **Warning**: This API is not stable.
// TODO: make this stable and move structs https://github.com/paritytech/substrate/issues/1890
#[rpc(name = "system_networkState", returns = "jsonrpc_core::Value")]
/// **Warning**: This API is not stable. Please do not programmatically interpret its output,
/// as its format might change at any time.
// TODO: the future of this call is uncertain: https://github.com/paritytech/substrate/issues/1890
// https://github.com/paritytech/substrate/issues/5541
#[rpc(name = "system_unstable_networkState", returns = "jsonrpc_core::Value")]
fn system_network_state(&self)
-> Compat<BoxFuture<'static, jsonrpc_core::Result<jsonrpc_core::Value>>>;

Expand Down