Skip to content

Commit fcfbaf7

Browse files
niklasad1ark0f
authored andcommitted
rpc server with HTTP/WS on the same socket (paritytech#12663)
* jsonrpsee v0.16 add backwards compatibility run old http server on http only * cargo fmt * update jsonrpsee 0.16.1 * less verbose cors log * fix nit in log: WS -> HTTP * revert needless changes in Cargo.lock * remove unused features in tower * fix nits; add client-core feature * jsonrpsee v0.16.2
1 parent 7053422 commit fcfbaf7

File tree

33 files changed

+355
-317
lines changed

33 files changed

+355
-317
lines changed

Cargo.lock

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

bin/node-template/node/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ frame-system = { version = "4.0.0-dev", path = "../../../frame/system" }
4343
pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, path = "../../../frame/transaction-payment" }
4444

4545
# These dependencies are used for the node template's RPCs
46-
jsonrpsee = { version = "0.15.1", features = ["server"] }
46+
jsonrpsee = { version = "0.16.2", features = ["server"] }
4747
sc-rpc = { version = "4.0.0-dev", path = "../../../client/rpc" }
4848
sp-api = { version = "4.0.0-dev", path = "../../../primitives/api" }
4949
sc-rpc-api = { version = "0.10.0-dev", path = "../../../client/rpc-api" }

bin/node/cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ array-bytes = "4.1"
3939
clap = { version = "4.0.9", features = ["derive"], optional = true }
4040
codec = { package = "parity-scale-codec", version = "3.0.0" }
4141
serde = { version = "1.0.136", features = ["derive"] }
42-
jsonrpsee = { version = "0.15.1", features = ["server"] }
42+
jsonrpsee = { version = "0.16.2", features = ["server"] }
4343
futures = "0.3.21"
4444
log = "0.4.17"
4545
rand = "0.8"

bin/node/rpc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ publish = false
1313
targets = ["x86_64-unknown-linux-gnu"]
1414

1515
[dependencies]
16-
jsonrpsee = { version = "0.15.1", features = ["server"] }
16+
jsonrpsee = { version = "0.16.2", features = ["server"] }
1717
node-primitives = { version = "2.0.0", path = "../primitives" }
1818
pallet-transaction-payment-rpc = { version = "4.0.0-dev", path = "../../../frame/transaction-payment/rpc/" }
1919
mmr-rpc = { version = "4.0.0-dev", path = "../../../client/merkle-mountain-range/rpc/" }

client/beefy/rpc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ homepage = "https://substrate.io"
1111
[dependencies]
1212
codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"] }
1313
futures = "0.3.21"
14-
jsonrpsee = { version = "0.15.1", features = ["server", "macros"] }
14+
jsonrpsee = { version = "0.16.2", features = ["client-core", "server", "macros"] }
1515
log = "0.4"
1616
parking_lot = "0.12.1"
1717
serde = { version = "1.0.136", features = ["derive"] }

client/beefy/rpc/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ mod tests {
172172
};
173173
use beefy_primitives::{known_payloads, Payload, SignedCommitment};
174174
use codec::{Decode, Encode};
175-
use jsonrpsee::{types::EmptyParams, RpcModule};
175+
use jsonrpsee::{types::EmptyServerParams as EmptyParams, RpcModule};
176176
use sp_runtime::traits::{BlakeTwo256, Hash};
177177
use substrate_test_runtime_client::runtime::Block;
178178

0 commit comments

Comments
 (0)