Skip to content

Commit

Permalink
Use tokio directly instead of jsonrpc_server_utils's re-export (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
steviez authored Mar 6, 2024
1 parent c161351 commit b38ea41
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion geyser-plugin-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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 }
Expand All @@ -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"]
2 changes: 1 addition & 1 deletion geyser-plugin-manager/src/geyser_plugin_manager.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
use {
agave_geyser_plugin_interface::geyser_plugin_interface::GeyserPlugin,
jsonrpc_core::{ErrorCode, Result as JsonRpcResult},
jsonrpc_server_utils::tokio::sync::oneshot::Sender as OneShotSender,
libloading::Library,
log::*,
std::{
ops::{Deref, DerefMut},
path::Path,
},
tokio::sync::oneshot::Sender as OneShotSender,
};

#[derive(Debug)]
Expand Down
4 changes: 2 additions & 2 deletions programs/sbf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion validator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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 }
Expand Down Expand Up @@ -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 }
Expand Down
6 changes: 3 additions & 3 deletions validator/src/admin_rpc_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -35,6 +34,7 @@ use {
thread::{self, Builder},
time::{Duration, SystemTime},
},
tokio::runtime::Runtime,
};

#[derive(Clone)]
Expand Down Expand Up @@ -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)]
Expand Down

0 comments on commit b38ea41

Please sign in to comment.