Skip to content

Commit

Permalink
Extract client code in send_transaction_service into a new structure (s…
Browse files Browse the repository at this point in the history
…olana-labs#3423)

In order to be able to use new client code in the `SendTransactionService`, I need to wrap network-related code with the new structure ConnectionCacheClient.
To to that I also had to move some auxiliary code into separate files.
  • Loading branch information
KirillLykov authored Nov 5, 2024
1 parent c3bc1bf commit 144925e
Show file tree
Hide file tree
Showing 10 changed files with 497 additions and 466 deletions.
1 change: 1 addition & 0 deletions 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 banks-server/src/banks_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ pub async fn start_tcp_server(
&bank_forks,
None,
receiver,
&connection_cache,
connection_cache.clone(),
5_000,
0,
exit.clone(),
Expand Down
1 change: 1 addition & 0 deletions programs/sbf/Cargo.lock

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

6 changes: 3 additions & 3 deletions rpc/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ impl JsonRpcRequestProcessor {
&bank_forks,
None,
receiver,
&connection_cache,
connection_cache,
1000,
1,
exit.clone(),
Expand Down Expand Up @@ -6487,7 +6487,7 @@ pub mod tests {
&bank_forks,
None,
receiver,
&connection_cache,
connection_cache,
1000,
1,
exit,
Expand Down Expand Up @@ -6761,7 +6761,7 @@ pub mod tests {
&bank_forks,
None,
receiver,
&connection_cache,
connection_cache,
1000,
1,
exit,
Expand Down
2 changes: 1 addition & 1 deletion rpc/src/rpc_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ impl JsonRpcService {
&bank_forks,
leader_info,
receiver,
&connection_cache,
connection_cache,
send_transaction_service_config,
exit,
));
Expand Down
1 change: 1 addition & 0 deletions send-transaction-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ edition = { workspace = true }

[dependencies]
crossbeam-channel = { workspace = true }
itertools = { workspace = true }
log = { workspace = true }
solana-client = { workspace = true }
solana-connection-cache = { workspace = true }
Expand Down
2 changes: 2 additions & 0 deletions send-transaction-service/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#![allow(clippy::arithmetic_side_effects)]
pub mod send_transaction_service;
pub mod send_transaction_service_stats;
pub mod tpu_info;
pub mod transaction_client;

#[macro_use]
extern crate solana_metrics;
Loading

0 comments on commit 144925e

Please sign in to comment.