Use tokio directly instead of jsonrpc_server_utils's re-export (#116)

This commit is contained in:
steviez 2024-03-06 14:49:32 -06:00 committed by GHA: Update Upstream From Fork
parent c9549399fb
commit f944227dba
7 changed files with 83 additions and 10 deletions

4
Cargo.lock generated
View File

@ -6059,7 +6059,6 @@ dependencies = [
"crossbeam-channel",
"json5",
"jsonrpc-core",
"jsonrpc-server-utils",
"libloading",
"log",
"serde_json",
@ -6074,6 +6073,7 @@ dependencies = [
"solana-sdk",
"solana-transaction-status",
"thiserror",
"tokio",
]
[[package]]
@ -7480,7 +7480,6 @@ dependencies = [
"jsonrpc-core-client",
"jsonrpc-derive",
"jsonrpc-ipc-server",
"jsonrpc-server-utils",
"lazy_static",
"libc",
"libloading",
@ -7528,6 +7527,7 @@ dependencies = [
"symlink",
"thiserror",
"tikv-jemallocator",
"tokio",
]
[[package]]

View File

@ -236,7 +236,6 @@ jsonrpc-derive = "18.0.0"
jsonrpc-http-server = "18.0.0"
jsonrpc-ipc-server = "18.0.0"
jsonrpc-pubsub = "18.0.0"
jsonrpc-server-utils = "18.0.0"
lazy_static = "1.4.0"
libc = "0.2.153"
libloading = "0.7.4"

View File

@ -14,7 +14,6 @@ bs58 = { workspace = true }
crossbeam-channel = { workspace = true }
json5 = { workspace = true }
jsonrpc-core = { workspace = true }
jsonrpc-server-utils = { workspace = true }
libloading = { workspace = true }
log = { workspace = true }
serde_json = { workspace = true }
@ -29,6 +28,7 @@ solana-runtime = { workspace = true }
solana-sdk = { workspace = true }
solana-transaction-status = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

View File

@ -1,6 +1,5 @@
use {
jsonrpc_core::{ErrorCode, Result as JsonRpcResult},
jsonrpc_server_utils::tokio::sync::oneshot::Sender as OneShotSender,
libloading::Library,
log::*,
solana_geyser_plugin_interface::geyser_plugin_interface::GeyserPlugin,
@ -8,6 +7,7 @@ use {
ops::{Deref, DerefMut},
path::Path,
},
tokio::sync::oneshot::Sender as OneShotSender,
};
#[derive(Debug)]

View File

@ -63,6 +63,80 @@ dependencies = [
"zeroize",
]
[[package]]
name = "agave-geyser-plugin-interface"
version = "1.19.0"
dependencies = [
"log",
"solana-sdk",
"solana-transaction-status",
"thiserror",
]
[[package]]
name = "agave-validator"
version = "1.19.0"
dependencies = [
"agave-geyser-plugin-interface",
"chrono",
"clap 2.33.3",
"console",
"core_affinity",
"crossbeam-channel",
"fd-lock",
"indicatif",
"itertools",
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
"jsonrpc-ipc-server",
"lazy_static",
"libc",
"libloading",
"log",
"num_cpus",
"rand 0.8.5",
"rayon",
"serde",
"serde_json",
"serde_yaml",
"signal-hook",
"solana-accounts-db",
"solana-clap-utils",
"solana-cli-config",
"solana-core",
"solana-download-utils",
"solana-entry",
"solana-faucet",
"solana-genesis-utils",
"solana-geyser-plugin-manager",
"solana-gossip",
"solana-ledger",
"solana-logger",
"solana-metrics",
"solana-net-utils",
"solana-perf",
"solana-poh",
"solana-rpc",
"solana-rpc-client",
"solana-rpc-client-api",
"solana-runtime",
"solana-sdk",
"solana-send-transaction-service",
"solana-storage-bigtable",
"solana-streamer",
"solana-svm",
"solana-test-validator",
"solana-tpu-client",
"solana-unified-scheduler-pool",
"solana-version",
"solana-vote-program",
"symlink",
"thiserror",
"tikv-jemallocator",
"tokio",
]
[[package]]
name = "ahash"
version = "0.7.6"
@ -5062,7 +5136,6 @@ dependencies = [
"crossbeam-channel",
"json5",
"jsonrpc-core",
"jsonrpc-server-utils",
"libloading",
"log",
"serde_json",
@ -5077,6 +5150,7 @@ dependencies = [
"solana-sdk",
"solana-transaction-status",
"thiserror",
"tokio",
]
[[package]]

View File

@ -23,7 +23,6 @@ jsonrpc-core = { workspace = true }
jsonrpc-core-client = { workspace = true, features = ["ipc"] }
jsonrpc-derive = { workspace = true }
jsonrpc-ipc-server = { workspace = true }
jsonrpc-server-utils = { workspace = true }
lazy_static = { workspace = true }
libloading = { workspace = true }
log = { workspace = true }
@ -66,6 +65,7 @@ solana-version = { workspace = true }
solana-vote-program = { workspace = true }
symlink = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
[dev-dependencies]
solana-account-decoder = { workspace = true }

View File

@ -6,7 +6,6 @@ use {
jsonrpc_ipc_server::{
tokio::sync::oneshot::channel as oneshot_channel, RequestContext, ServerBuilder,
},
jsonrpc_server_utils::tokio,
log::*,
serde::{de::Deserializer, Deserialize, Serialize},
solana_accounts_db::accounts_index::AccountIndex,
@ -35,6 +34,7 @@ use {
thread::{self, Builder},
time::{Duration, SystemTime},
},
tokio::runtime::Runtime,
};
#[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 {
jsonrpc_server_utils::tokio::runtime::Runtime::new().expect("new tokio runtime")
pub fn runtime() -> Runtime {
Runtime::new().expect("new tokio runtime")
}
#[derive(Default, Deserialize, Clone)]