Upgrade jsonrpsee to v0.3 (#1051)

* Upgrade `jsonrpsee` to v0.3

* whitespace

* fmt

Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
This commit is contained in:
David
2021-09-27 12:24:38 +00:00
committed by Bastian Köcher
parent 84258f5d8c
commit f3eefc9df9
9 changed files with 32 additions and 23 deletions
+2 -2
View File
@@ -10,8 +10,8 @@ async-std = "1.6.5"
bp-eth-poa = { path = "../../primitives/ethereum-poa" }
headers-relay = { path = "../headers" }
hex-literal = "0.3"
jsonrpsee-proc-macros = "0.2"
jsonrpsee-ws-client = "0.2"
jsonrpsee-proc-macros = "0.3.1"
jsonrpsee-ws-client = "0.3.1"
libsecp256k1 = { version = "0.3.4", default-features = false, features = ["hmac"] }
log = "0.4.11"
relay-utils = { path = "../utils" }
+7 -5
View File
@@ -18,7 +18,7 @@
use crate::types::U256;
use jsonrpsee_ws_client::Error as RpcError;
use jsonrpsee_ws_client::types::Error as RpcError;
use relay_utils::MaybeConnectionError;
/// Result type used by Ethereum client.
@@ -73,10 +73,12 @@ impl MaybeConnectionError for Error {
fn is_connection_error(&self) -> bool {
matches!(
*self,
Error::RpcError(RpcError::Transport(_)) |
Error::RpcError(RpcError::Internal(_)) |
Error::RpcError(RpcError::RestartNeeded(_)) |
Error::ClientNotSynced(_),
Error::RpcError(RpcError::Transport(_))
// right now if connection to the ws server is dropped (after it is already established),
// we're getting this error
| Error::RpcError(RpcError::Internal(_))
| Error::RpcError(RpcError::RestartNeeded(_))
| Error::ClientNotSynced(_),
)
}
}