Skip to content

Commit 050fbc2

Browse files
KirillLykovmergify[bot]
authored andcommitted
Extract client code in send_transaction_service into a new structure (#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. (cherry picked from commit 144925e)
1 parent dd1a22f commit 050fbc2

File tree

10 files changed

+497
-466
lines changed

10 files changed

+497
-466
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

banks-server/src/banks_server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ pub async fn start_tcp_server(
458458
&bank_forks,
459459
None,
460460
receiver,
461-
&connection_cache,
461+
connection_cache.clone(),
462462
5_000,
463463
0,
464464
exit.clone(),

programs/sbf/Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rpc/src/rpc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ impl JsonRpcRequestProcessor {
377377
&bank_forks,
378378
None,
379379
receiver,
380-
&connection_cache,
380+
connection_cache,
381381
1000,
382382
1,
383383
exit.clone(),
@@ -6486,7 +6486,7 @@ pub mod tests {
64866486
&bank_forks,
64876487
None,
64886488
receiver,
6489-
&connection_cache,
6489+
connection_cache,
64906490
1000,
64916491
1,
64926492
exit,
@@ -6760,7 +6760,7 @@ pub mod tests {
67606760
&bank_forks,
67616761
None,
67626762
receiver,
6763-
&connection_cache,
6763+
connection_cache,
67646764
1000,
67656765
1,
67666766
exit,

rpc/src/rpc_service.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ impl JsonRpcService {
479479
&bank_forks,
480480
leader_info,
481481
receiver,
482-
&connection_cache,
482+
connection_cache,
483483
send_transaction_service_config,
484484
exit,
485485
));

send-transaction-service/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ edition = { workspace = true }
1111

1212
[dependencies]
1313
crossbeam-channel = { workspace = true }
14+
itertools = { workspace = true }
1415
log = { workspace = true }
1516
solana-client = { workspace = true }
1617
solana-connection-cache = { workspace = true }

send-transaction-service/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#![allow(clippy::arithmetic_side_effects)]
22
pub mod send_transaction_service;
3+
pub mod send_transaction_service_stats;
34
pub mod tpu_info;
5+
pub mod transaction_client;
46

57
#[macro_use]
68
extern crate solana_metrics;

0 commit comments

Comments
 (0)