diff --git a/substrate/bin/node/cli/browser-demo/index.html b/substrate/bin/node/cli/browser-demo/index.html index 60acfde39f..4a706906ab 100644 --- a/substrate/bin/node/cli/browser-demo/index.html +++ b/substrate/bin/node/cli/browser-demo/index.html @@ -27,8 +27,8 @@ async function start() { 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); } diff --git a/substrate/client/rpc-api/src/system/mod.rs b/substrate/client/rpc-api/src/system/mod.rs index 2cf22b9802..2e8a7aa126 100644 --- a/substrate/client/rpc-api/src/system/mod.rs +++ b/substrate/client/rpc-api/src/system/mod.rs @@ -79,9 +79,11 @@ pub trait SystemApi { /// 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>>;