Use tokio directly instead of jsonrpc_server_utils's re-export (#116)
This commit is contained in:
parent
c1613517bf
commit
b38ea4145e
|
@ -205,7 +205,6 @@ dependencies = [
|
||||||
"jsonrpc-core-client",
|
"jsonrpc-core-client",
|
||||||
"jsonrpc-derive",
|
"jsonrpc-derive",
|
||||||
"jsonrpc-ipc-server",
|
"jsonrpc-ipc-server",
|
||||||
"jsonrpc-server-utils",
|
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"libc",
|
"libc",
|
||||||
"libloading",
|
"libloading",
|
||||||
|
@ -252,6 +251,7 @@ dependencies = [
|
||||||
"symlink",
|
"symlink",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tikv-jemallocator",
|
"tikv-jemallocator",
|
||||||
|
"tokio",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -6232,7 +6232,6 @@ dependencies = [
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
"json5",
|
"json5",
|
||||||
"jsonrpc-core",
|
"jsonrpc-core",
|
||||||
"jsonrpc-server-utils",
|
|
||||||
"libloading",
|
"libloading",
|
||||||
"log",
|
"log",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
|
@ -6246,6 +6245,7 @@ dependencies = [
|
||||||
"solana-sdk",
|
"solana-sdk",
|
||||||
"solana-transaction-status",
|
"solana-transaction-status",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
|
"tokio",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
@ -236,7 +236,6 @@ jsonrpc-derive = "18.0.0"
|
||||||
jsonrpc-http-server = "18.0.0"
|
jsonrpc-http-server = "18.0.0"
|
||||||
jsonrpc-ipc-server = "18.0.0"
|
jsonrpc-ipc-server = "18.0.0"
|
||||||
jsonrpc-pubsub = "18.0.0"
|
jsonrpc-pubsub = "18.0.0"
|
||||||
jsonrpc-server-utils = "18.0.0"
|
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
libc = "0.2.153"
|
libc = "0.2.153"
|
||||||
libloading = "0.7.4"
|
libloading = "0.7.4"
|
||||||
|
|
|
@ -15,7 +15,6 @@ bs58 = { workspace = true }
|
||||||
crossbeam-channel = { workspace = true }
|
crossbeam-channel = { workspace = true }
|
||||||
json5 = { workspace = true }
|
json5 = { workspace = true }
|
||||||
jsonrpc-core = { workspace = true }
|
jsonrpc-core = { workspace = true }
|
||||||
jsonrpc-server-utils = { workspace = true }
|
|
||||||
libloading = { workspace = true }
|
libloading = { workspace = true }
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
|
@ -29,6 +28,7 @@ solana-runtime = { workspace = true }
|
||||||
solana-sdk = { workspace = true }
|
solana-sdk = { workspace = true }
|
||||||
solana-transaction-status = { workspace = true }
|
solana-transaction-status = { workspace = true }
|
||||||
thiserror = { workspace = true }
|
thiserror = { workspace = true }
|
||||||
|
tokio = { workspace = true }
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
targets = ["x86_64-unknown-linux-gnu"]
|
targets = ["x86_64-unknown-linux-gnu"]
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
use {
|
use {
|
||||||
agave_geyser_plugin_interface::geyser_plugin_interface::GeyserPlugin,
|
agave_geyser_plugin_interface::geyser_plugin_interface::GeyserPlugin,
|
||||||
jsonrpc_core::{ErrorCode, Result as JsonRpcResult},
|
jsonrpc_core::{ErrorCode, Result as JsonRpcResult},
|
||||||
jsonrpc_server_utils::tokio::sync::oneshot::Sender as OneShotSender,
|
|
||||||
libloading::Library,
|
libloading::Library,
|
||||||
log::*,
|
log::*,
|
||||||
std::{
|
std::{
|
||||||
ops::{Deref, DerefMut},
|
ops::{Deref, DerefMut},
|
||||||
path::Path,
|
path::Path,
|
||||||
},
|
},
|
||||||
|
tokio::sync::oneshot::Sender as OneShotSender,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
|
@ -90,7 +90,6 @@ dependencies = [
|
||||||
"jsonrpc-core-client",
|
"jsonrpc-core-client",
|
||||||
"jsonrpc-derive",
|
"jsonrpc-derive",
|
||||||
"jsonrpc-ipc-server",
|
"jsonrpc-ipc-server",
|
||||||
"jsonrpc-server-utils",
|
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"libc",
|
"libc",
|
||||||
"libloading",
|
"libloading",
|
||||||
|
@ -135,6 +134,7 @@ dependencies = [
|
||||||
"symlink",
|
"symlink",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tikv-jemallocator",
|
"tikv-jemallocator",
|
||||||
|
"tokio",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -5127,7 +5127,6 @@ dependencies = [
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
"json5",
|
"json5",
|
||||||
"jsonrpc-core",
|
"jsonrpc-core",
|
||||||
"jsonrpc-server-utils",
|
|
||||||
"libloading",
|
"libloading",
|
||||||
"log",
|
"log",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
|
@ -5141,6 +5140,7 @@ dependencies = [
|
||||||
"solana-sdk",
|
"solana-sdk",
|
||||||
"solana-transaction-status",
|
"solana-transaction-status",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
|
"tokio",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
@ -24,7 +24,6 @@ jsonrpc-core = { workspace = true }
|
||||||
jsonrpc-core-client = { workspace = true, features = ["ipc"] }
|
jsonrpc-core-client = { workspace = true, features = ["ipc"] }
|
||||||
jsonrpc-derive = { workspace = true }
|
jsonrpc-derive = { workspace = true }
|
||||||
jsonrpc-ipc-server = { workspace = true }
|
jsonrpc-ipc-server = { workspace = true }
|
||||||
jsonrpc-server-utils = { workspace = true }
|
|
||||||
lazy_static = { workspace = true }
|
lazy_static = { workspace = true }
|
||||||
libloading = { workspace = true }
|
libloading = { workspace = true }
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
|
@ -66,6 +65,7 @@ solana-version = { workspace = true }
|
||||||
solana-vote-program = { workspace = true }
|
solana-vote-program = { workspace = true }
|
||||||
symlink = { workspace = true }
|
symlink = { workspace = true }
|
||||||
thiserror = { workspace = true }
|
thiserror = { workspace = true }
|
||||||
|
tokio = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
solana-account-decoder = { workspace = true }
|
solana-account-decoder = { workspace = true }
|
||||||
|
|
|
@ -6,7 +6,6 @@ use {
|
||||||
jsonrpc_ipc_server::{
|
jsonrpc_ipc_server::{
|
||||||
tokio::sync::oneshot::channel as oneshot_channel, RequestContext, ServerBuilder,
|
tokio::sync::oneshot::channel as oneshot_channel, RequestContext, ServerBuilder,
|
||||||
},
|
},
|
||||||
jsonrpc_server_utils::tokio,
|
|
||||||
log::*,
|
log::*,
|
||||||
serde::{de::Deserializer, Deserialize, Serialize},
|
serde::{de::Deserializer, Deserialize, Serialize},
|
||||||
solana_accounts_db::accounts_index::AccountIndex,
|
solana_accounts_db::accounts_index::AccountIndex,
|
||||||
|
@ -35,6 +34,7 @@ use {
|
||||||
thread::{self, Builder},
|
thread::{self, Builder},
|
||||||
time::{Duration, SystemTime},
|
time::{Duration, SystemTime},
|
||||||
},
|
},
|
||||||
|
tokio::runtime::Runtime,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
@ -815,8 +815,8 @@ pub async fn connect(ledger_path: &Path) -> std::result::Result<gen_client::Clie
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn runtime() -> jsonrpc_server_utils::tokio::runtime::Runtime {
|
pub fn runtime() -> Runtime {
|
||||||
jsonrpc_server_utils::tokio::runtime::Runtime::new().expect("new tokio runtime")
|
Runtime::new().expect("new tokio runtime")
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default, Deserialize, Clone)]
|
#[derive(Default, Deserialize, Clone)]
|
||||||
|
|
Loading…
Reference in New Issue