mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 21:01:05 +00:00
JSON-RPC client generation (#2778)
* Bump jsonrpc & generate clients. * Initial version of JSON-RPC client. * Re-wort * Remove spurious `#[derive(Encode, Decode)]` They did not compile, since `Encode` and `Decode` are deliberately not implemented for `usize`. Fixes #2742. * Re-write rpc-client example. * Update to jsonrpc=12.0.0 * Remove unnecessary import * Bump version. * Revert version bump. * Bump again.
This commit is contained in:
committed by
Gavin Wood
parent
5df89a8a6f
commit
6112f815b3
@@ -5,9 +5,9 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
http = { package = "jsonrpc-http-server", version = "10.0.1" }
|
||||
pubsub = { package = "jsonrpc-pubsub", version = "10.0.1" }
|
||||
ws = { package = "jsonrpc-ws-server", version = "10.0.1" }
|
||||
http = { package = "jsonrpc-http-server", version = "12.0.0" }
|
||||
pubsub = { package = "jsonrpc-pubsub", version = "12.0.0" }
|
||||
ws = { package = "jsonrpc-ws-server", version = "12.0.0" }
|
||||
log = "0.4"
|
||||
serde = "1.0"
|
||||
substrate-rpc = { path = "../rpc" }
|
||||
|
||||
@@ -89,9 +89,9 @@ pub fn start_ws(
|
||||
.allowed_origins(map_cors(cors))
|
||||
.start(addr)
|
||||
.map_err(|err| match err {
|
||||
ws::Error(ws::ErrorKind::Io(io), _) => io,
|
||||
ws::Error(ws::ErrorKind::ConnectionClosed, _) => io::ErrorKind::BrokenPipe.into(),
|
||||
ws::Error(e, _) => {
|
||||
ws::Error::Io(io) => io,
|
||||
ws::Error::ConnectionClosed => io::ErrorKind::BrokenPipe.into(),
|
||||
e => {
|
||||
error!("{}", e);
|
||||
io::ErrorKind::Other.into()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user