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

Commit 4bb517e

Browse files
Andronik Ordiandebris
authored andcommitted
update jsonrpc to 12.0 (#10841)
* update jsonrpc to 12.0 * use reexported ws error
1 parent de906d4 commit 4bb517e

31 files changed

+188
-151
lines changed

Cargo.lock

Lines changed: 141 additions & 104 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ serde_derive = "1.0"
2929
futures = "0.1"
3030
fdlimit = "0.1"
3131
ctrlc = { git = "https://github.com/paritytech/rust-ctrlc.git" }
32-
jsonrpc-core = "10.0.1"
32+
jsonrpc-core = "12.0.0"
3333
parity-bytes = "0.1"
3434
common-types = { path = "ethcore/types" }
3535
ethcore = { path = "ethcore", features = ["parity"] }

cli-signer/rpc-client/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ serde_json = "1.0"
1515
url = "1.2.0"
1616
matches = "0.1"
1717
parking_lot = "0.7"
18-
jsonrpc-core = "10.0.1"
19-
jsonrpc-ws-server = "10.0.1"
18+
jsonrpc-core = "12.0.0"
19+
jsonrpc-ws-server = "12.0.0"
2020
parity-rpc = { path = "../../rpc" }
2121
keccak-hash = "0.2.0"

ipfs/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ authors = ["Parity Technologies <admin@parity.io>"]
99
ethcore = { path = "../ethcore" }
1010
parity-bytes = "0.1"
1111
ethereum-types = "0.6.0"
12-
jsonrpc-core = "10.0.1"
13-
jsonrpc-http-server = "10.0.1"
12+
jsonrpc-core = "12.0.0"
13+
jsonrpc-http-server = "12.0.0"
1414
rlp = "0.4.0"
1515
cid = "0.3"
1616
multihash = "0.8"

miner/stratum/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ authors = ["Parity Technologies <admin@parity.io>"]
88
[dependencies]
99
ethereum-types = "0.6.0"
1010
keccak-hash = "0.2.0"
11-
jsonrpc-core = "10.0.1"
12-
jsonrpc-tcp-server = "10.0.1"
11+
jsonrpc-core = "12.0.0"
12+
jsonrpc-tcp-server = "12.0.0"
1313
log = "0.4"
1414
parking_lot = "0.7"
1515

parity/configuration.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ use ethcore::miner::{stratum, MinerOptions};
3434
use ethcore::snapshot::SnapshotConfiguration;
3535
use ethcore::verification::queue::VerifierSettings;
3636
use miner::pool;
37-
use num_cpus;
3837

3938
use rpc::{IpcConfiguration, HttpConfiguration, WsConfiguration};
4039
use parity_rpc::NetworkSettings;

parity/rpc.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use parity_rpc::{self as rpc, Metadata, DomainsValidation};
2929
use rpc_apis::{self, ApiSet};
3030

3131
pub use parity_rpc::{IpcServer, HttpServer, RequestMiddleware};
32-
pub use parity_rpc::ws::Server as WsServer;
32+
pub use parity_rpc::ws::{Server as WsServer, ws};
3333

3434
pub const DAPPS_DOMAIN: &'static str = "web3.site";
3535

@@ -187,7 +187,9 @@ pub fn new_ws<D: rpc_apis::Dependencies>(
187187

188188
match start_result {
189189
Ok(server) => Ok(Some(server)),
190-
Err(rpc::ws::Error(rpc::ws::ErrorKind::Io(ref err), _)) if err.kind() == io::ErrorKind::AddrInUse => Err(
190+
Err(rpc::ws::Error::WsError(ws::Error {
191+
kind: ws::ErrorKind::Io(ref err), ..
192+
})) if err.kind() == io::ErrorKind::AddrInUse => Err(
191193
format!("WebSockets address {} is already in use, make sure that another instance of an Ethereum client is not running or change the address using the --ws-port and --ws-interface options.", url)
192194
),
193195
Err(e) => Err(format!("WebSockets error: {:?}", e)),

rpc/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ tokio-timer = "0.1"
2828
transient-hashmap = "0.4"
2929
itertools = "0.5"
3030

31-
jsonrpc-core = "10.0.1"
32-
jsonrpc-derive = "10.0.2"
33-
jsonrpc-http-server = "10.0.1"
34-
jsonrpc-ws-server = "10.0.1"
35-
jsonrpc-ipc-server = "10.0.1"
36-
jsonrpc-pubsub = "10.0.1"
31+
jsonrpc-core = "12.0.0"
32+
jsonrpc-derive = "12.0.0"
33+
jsonrpc-http-server = "12.0.0"
34+
jsonrpc-ws-server = "12.0.0"
35+
jsonrpc-ipc-server = "12.0.0"
36+
jsonrpc-pubsub = "12.0.0"
3737

3838
common-types = { path = "../ethcore/types" }
3939
ethash = { path = "../ethash" }

rpc/src/v1/traits/debug.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use jsonrpc_derive::rpc;
2222
use v1::types::RichBlock;
2323

2424
/// Debug RPC interface.
25-
#[rpc]
25+
#[rpc(server)]
2626
pub trait Debug {
2727
/// Returns recently seen bad blocks.
2828
#[rpc(name = "debug_getBadBlocks")]

rpc/src/v1/traits/eth.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use v1::types::{RichBlock, BlockNumber, Bytes, CallRequest, Filter, FilterChange
2323
use v1::types::{Log, Receipt, SyncStatus, Transaction, Work};
2424

2525
/// Eth rpc interface.
26-
#[rpc]
26+
#[rpc(server)]
2727
pub trait Eth {
2828
/// RPC Metadata
2929
type Metadata;
@@ -189,7 +189,7 @@ pub trait Eth {
189189

190190
/// Eth filters rpc api (polling).
191191
// TODO: do filters api properly
192-
#[rpc]
192+
#[rpc(server)]
193193
pub trait EthFilter {
194194
/// Returns id of new filter.
195195
#[rpc(name = "eth_newFilter")]

0 commit comments

Comments
 (0)