mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 04:41:02 +00:00
rpc server with HTTP/WS on the same socket (#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
This commit is contained in:
@@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
codec = { package = "parity-scale-codec", version = "3.0.0" }
|
||||
futures = "0.3.21"
|
||||
hash-db = { version = "0.15.2", default-features = false }
|
||||
jsonrpsee = { version = "0.15.1", features = ["server"] }
|
||||
jsonrpsee = { version = "0.16.2", features = ["server"] }
|
||||
lazy_static = { version = "1.4.0", optional = true }
|
||||
log = "0.4.17"
|
||||
parking_lot = "0.12.1"
|
||||
|
||||
@@ -23,7 +23,7 @@ use assert_matches::assert_matches;
|
||||
use codec::Encode;
|
||||
use jsonrpsee::{
|
||||
core::Error as RpcError,
|
||||
types::{error::CallError, EmptyParams},
|
||||
types::{error::CallError, EmptyServerParams as EmptyParams},
|
||||
RpcModule,
|
||||
};
|
||||
use sc_transaction_pool::{BasicPool, FullChainApi};
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
use super::*;
|
||||
use crate::testing::{test_executor, timeout_secs};
|
||||
use assert_matches::assert_matches;
|
||||
use jsonrpsee::types::EmptyParams;
|
||||
use jsonrpsee::types::EmptyServerParams as EmptyParams;
|
||||
use sc_block_builder::BlockBuilderProvider;
|
||||
use sp_consensus::BlockOrigin;
|
||||
use sp_rpc::list::ListOrValue;
|
||||
|
||||
@@ -28,9 +28,8 @@ use std::sync::Arc;
|
||||
use crate::SubscriptionTaskExecutor;
|
||||
|
||||
use jsonrpsee::{
|
||||
core::{Error as JsonRpseeError, RpcResult},
|
||||
core::{server::rpc_module::SubscriptionSink, Error as JsonRpseeError, RpcResult},
|
||||
types::SubscriptionResult,
|
||||
ws_server::SubscriptionSink,
|
||||
};
|
||||
|
||||
use sc_rpc_api::{state::ReadProof, DenyUnsafe};
|
||||
|
||||
@@ -23,7 +23,7 @@ use assert_matches::assert_matches;
|
||||
use futures::executor;
|
||||
use jsonrpsee::{
|
||||
core::Error as RpcError,
|
||||
types::{error::CallError as RpcCallError, EmptyParams, ErrorObject},
|
||||
types::{error::CallError as RpcCallError, EmptyServerParams as EmptyParams, ErrorObject},
|
||||
};
|
||||
use sc_block_builder::BlockBuilderProvider;
|
||||
use sc_rpc_api::DenyUnsafe;
|
||||
|
||||
@@ -21,7 +21,7 @@ use assert_matches::assert_matches;
|
||||
use futures::prelude::*;
|
||||
use jsonrpsee::{
|
||||
core::Error as RpcError,
|
||||
types::{error::CallError, EmptyParams},
|
||||
types::{error::CallError, EmptyServerParams as EmptyParams},
|
||||
RpcModule,
|
||||
};
|
||||
use sc_network::{self, config::Role, PeerId};
|
||||
|
||||
Reference in New Issue
Block a user