Skip to content

Commit fcc0c6c

Browse files
committed
add
1 parent 474d062 commit fcc0c6c

24 files changed

+431
-91
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ anchor-lang = { path = "anchor/lang" }
199199
anyhow = "1.0.98"
200200
aquamarine = "0.6.0"
201201
arbitrary = "1.4.1"
202+
arc-swap = "1"
202203
ark-bn254 = "0.4.0"
203204
ark-ec = "0.4.0"
204205
ark-ff = "0.4.0"

core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ agave-transaction-view = { workspace = true }
4747
ahash = { workspace = true }
4848
anchor-lang = { workspace = true }
4949
anyhow = { workspace = true }
50+
arc-swap = { workspace = true }
5051
arrayvec = { workspace = true }
5152
assert_matches = { workspace = true }
5253
async-trait = { workspace = true }

core/src/admin_rpc_post_init.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use {
44
proxy::{block_engine_stage::BlockEngineConfig, relayer_stage::RelayerConfig},
55
repair::{outstanding_requests::OutstandingRequests, serve_repair::ShredRepairType},
66
},
7+
arc_swap::ArcSwap,
78
solana_gossip::cluster_info::ClusterInfo,
89
solana_pubkey::Pubkey,
910
solana_quic_definitions::NotifyKeyUpdate,
@@ -81,6 +82,6 @@ pub struct AdminRpcRequestMetadataPostInit {
8182
pub cluster_slots: Arc<ClusterSlots>,
8283
pub block_engine_config: Arc<Mutex<BlockEngineConfig>>,
8384
pub relayer_config: Arc<Mutex<RelayerConfig>>,
84-
pub shred_receiver_address: Arc<RwLock<Option<SocketAddr>>>,
85-
pub shred_retransmit_receiver_address: Arc<RwLock<Option<SocketAddr>>>,
85+
pub shred_receiver_address: Arc<ArcSwap<Option<SocketAddr>>>,
86+
pub shred_retransmit_receiver_address: Arc<ArcSwap<Option<SocketAddr>>>,
8687
}

core/src/banking_simulation.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use {
1212
validator::{BlockProductionMethod, TransactionStructure},
1313
},
1414
agave_banking_stage_ingress_types::BankingPacketBatch,
15+
arc_swap::ArcSwap,
1516
assert_matches::assert_matches,
1617
bincode::deserialize_from,
1718
crossbeam_channel::{unbounded, Sender},
@@ -817,7 +818,8 @@ impl BankingSimulator {
817818
bank_forks.clone(),
818819
shred_version,
819820
sender,
820-
Arc::new(RwLock::new(None)),
821+
Arc::new(ArcSwap::default()),
822+
Arc::new(ArcSwap::default()),
821823
);
822824

823825
info!("Start banking stage!...");

0 commit comments

Comments
 (0)