New jsonrpc-core with futures and metadata support (#3859)
* Bumping serde & serde_json * Super-initial usage of new jsonrpc * Single event loop for jsonrpc * Metadata * Supporting metadata extraction for eth_accounts * Fixing Cargo.lock * Removing uneccessary clones * Fixing unused import * Unused import * Fixing test
This commit is contained in:
@@ -57,6 +57,17 @@ impl EventLoop {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns this event loop raw remote.
|
||||
///
|
||||
/// Deprecated: Exists only to connect with current JSONRPC implementation.
|
||||
pub fn raw_remote(&self) -> TokioRemote {
|
||||
if let Mode::Tokio(ref remote) = self.remote.inner {
|
||||
remote.clone()
|
||||
} else {
|
||||
panic!("Event loop is never initialized in other mode then Tokio.")
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns event loop remote.
|
||||
pub fn remote(&self) -> Remote {
|
||||
self.remote.clone()
|
||||
@@ -76,6 +87,15 @@ pub struct Remote {
|
||||
}
|
||||
|
||||
impl Remote {
|
||||
/// Remote for existing event loop.
|
||||
///
|
||||
/// Deprecated: Exists only to connect with current JSONRPC implementation.
|
||||
pub fn new(remote: TokioRemote) -> Self {
|
||||
Remote {
|
||||
inner: Mode::Tokio(remote),
|
||||
}
|
||||
}
|
||||
|
||||
/// Synchronous remote, used mostly for tests.
|
||||
pub fn new_sync() -> Self {
|
||||
Remote {
|
||||
|
||||
Reference in New Issue
Block a user