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

Commit

Permalink
chore: update jsonrpsee to v0.10.1 (paritytech#11173)
Browse files Browse the repository at this point in the history
* fix(bin/node): remove unsed dep jsonrpsee

* chore(remote ext): update jsonrpsee v0.10.1

* chore(try runtime): update jsonrpsee v0.10.1

* Update utils/frame/try-runtime/cli/src/commands/follow_chain.rs

* cargo fmt
  • Loading branch information
niklasad1 authored and DaviRain-Su committed Aug 23, 2022
1 parent 27387ac commit 1e904c4
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 108 deletions.
125 changes: 36 additions & 89 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion bin/node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ async-std = { version = "1.10.0", features = ["attributes"] }
soketto = "0.4.2"
criterion = { version = "0.3.5", features = ["async_tokio"] }
tokio = { version = "1.17.0", features = ["macros", "time", "parking_lot"] }
jsonrpsee-ws-client = "0.4.1"
wait-timeout = "0.2"
remote-externalities = { path = "../../../utils/frame/remote-externalities" }
pallet-timestamp = { version = "4.0.0-dev", path = "../../../frame/timestamp" }
Expand Down
2 changes: 1 addition & 1 deletion client/informant/src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use std::{fmt, time::Instant};
/// like:
///
/// > Syncing 5.4 bps, target=#531028 (4 peers), best: #90683 (0x4ca8…51b8),
/// > finalized #360 (0x6f24…a38b), ⬇ 5.5kiB/s ⬆ 0.9kiB/s
/// > finalized #360 (0x6f24…a38b), ⬇ 5.5kiB/s ⬆ 0.9kiB/s
///
/// # Usage
///
Expand Down
2 changes: 1 addition & 1 deletion client/network/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ pub struct NonDefaultSetConfig {
/// considered established once this protocol is open.
///
/// > **Note**: This field isn't present for the default set, as this is handled internally
/// > by the networking code.
/// > by the networking code.
pub notifications_protocol: Cow<'static, str>,
/// If the remote reports that it doesn't support the protocol indicated in the
/// `notifications_protocol` field, then each of these fallback names will be tried one by
Expand Down
4 changes: 2 additions & 2 deletions client/network/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@
//! protocol ID.
//!
//! > **Note**: It is possible for the same connection to be used for multiple chains. For example,
//! > one can use both the `/dot/sync/2` and `/sub/sync/2` protocols on the same
//! > connection, provided that the remote supports them.
//! > one can use both the `/dot/sync/2` and `/sub/sync/2` protocols on the same
//! > connection, provided that the remote supports them.
//!
//! Substrate uses the following standard libp2p protocols:
//!
Expand Down
4 changes: 2 additions & 2 deletions client/peerset/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ impl PeersetHandle {
/// Has no effect if the node was already a reserved peer.
///
/// > **Note**: Keep in mind that the networking has to know an address for this node,
/// > otherwise it will not be able to connect to it.
/// > otherwise it will not be able to connect to it.
pub fn add_reserved_peer(&self, set_id: SetId, peer_id: PeerId) {
let _ = self.tx.unbounded_send(Action::AddReservedPeer(set_id, peer_id));
}
Expand Down Expand Up @@ -232,7 +232,7 @@ pub struct SetConfig {
/// List of bootstrap nodes to initialize the set with.
///
/// > **Note**: Keep in mind that the networking has to know an address for these nodes,
/// > otherwise it will not be able to connect to them.
/// > otherwise it will not be able to connect to them.
pub bootnodes: Vec<PeerId>,

/// Lists of nodes we should always be connected to.
Expand Down
8 changes: 4 additions & 4 deletions client/peerset/src/peersstate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
//! slots.
//!
//! > Note: This module is purely dedicated to managing slots and reputations. Features such as
//! > for example connecting to some nodes in priority should be added outside of this
//! > module, rather than inside.
//! > for example connecting to some nodes in priority should be added outside of this
//! > module, rather than inside.
use libp2p::PeerId;
use log::error;
Expand All @@ -50,8 +50,8 @@ pub struct PeersState {
/// List of nodes that we know about.
///
/// > **Note**: This list should really be ordered by decreasing reputation, so that we can
/// easily select the best node to connect to. As a first draft, however, we don't
/// sort, to make the logic easier.
/// > easily select the best node to connect to. As a first draft, however, we don't sort, to
/// > make the logic easier.
nodes: HashMap<PeerId, Node>,

/// Configuration of each set. The size of this `Vec` is never modified.
Expand Down
2 changes: 1 addition & 1 deletion utils/frame/remote-externalities/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
jsonrpsee = { version = "0.8", features = ["ws-client", "macros"] }
jsonrpsee = { version = "0.10.1", features = ["ws-client", "macros"] }

env_logger = "0.9"
frame-support = { path = "../../../frame/support", optional = true, version = "4.0.0-dev" }
Expand Down
2 changes: 1 addition & 1 deletion utils/frame/try-runtime/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ sp-externalities = { version = "0.12.0", path = "../../../../primitives/external
sp-version = { version = "5.0.0", path = "../../../../primitives/version" }

remote-externalities = { version = "0.10.0-dev", path = "../../remote-externalities" }
jsonrpsee = { version = "0.4.1", default-features = false, features = ["ws-client"] }
jsonrpsee = { version = "0.10.1", default-features = false, features = ["ws-client"] }
12 changes: 6 additions & 6 deletions utils/frame/try-runtime/cli/src/commands/follow_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::{
state_machine_call_with_proof, SharedParams, LOG_TARGET,
};
use jsonrpsee::{
types::{traits::SubscriptionClient, Subscription},
core::client::{Subscription, SubscriptionClientT},
ws_client::WsClientBuilder,
};
use parity_scale_codec::Decode;
Expand Down Expand Up @@ -76,13 +76,13 @@ where

loop {
let header = match subscription.next().await {
Ok(Some(header)) => header,
Ok(None) => {
log::warn!("subscription returned `None`. Probably decoding has failed.");
Some(Ok(header)) => header,
None => {
log::warn!("subscription closed");
break
},
Err(why) => {
log::warn!("subscription returned error: {:?}.", why);
Some(Err(why)) => {
log::warn!("subscription returned error: {:?}. Probably decoding has failed.", why);
continue
},
};
Expand Down

0 comments on commit 1e904c4

Please sign in to comment.