Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/banking_stage/qos_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ mod tests {
],
Some(&keypair.pubkey()),
));
let transfer_tx = RuntimeTransaction::from_transaction_for_tests(transaction.clone());
let transfer_tx = RuntimeTransaction::from_transaction_for_tests(transaction);
let txs: Vec<_> = (0..transaction_count)
.map(|_| transfer_tx.clone())
.collect();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ mod tests {
let (sender, receiver) = unbounded();
let (bank_forks, _mint_keypair) = test_bank_forks();
let (mut receive_and_buffer, mut container) =
setup_transaction_view_receive_and_buffer(receiver, bank_forks.clone());
setup_transaction_view_receive_and_buffer(receiver, bank_forks);

let packet_batches = Arc::new(vec![PacketBatch::from(RecycledPacketBatch::new(vec![
Packet::new([1u8; PACKET_DATA_SIZE], Meta::default()),
Expand Down Expand Up @@ -832,7 +832,7 @@ mod tests {
let (sender, receiver) = unbounded();
let (bank_forks, mint_keypair) = test_bank_forks();
let (mut receive_and_buffer, mut container) =
setup_transaction_view_receive_and_buffer(receiver, bank_forks.clone());
setup_transaction_view_receive_and_buffer(receiver, bank_forks);

let transaction = transfer(&mint_keypair, &Pubkey::new_unique(), 1, Hash::new_unique());
let packet_batches = Arc::new(to_packet_batches(&[transaction], 1));
Expand Down
4 changes: 2 additions & 2 deletions core/src/forwarding_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ impl TpuClientNextClient {
) -> Self {
// For now use large channel, the more suitable size to be found later.
let (sender, receiver) = mpsc::channel(128);
let leader_updater = forward_address_getter.clone();
let leader_updater = forward_address_getter;

let config = Self::create_config(bind_socket, stake_identity);
let (update_certificate_sender, update_certificate_receiver) = watch::channel(None);
Expand All @@ -535,7 +535,7 @@ impl TpuClientNextClient {
runtime_handle.spawn(scheduler.get_stats().report_to_influxdb(
"forwarding-stage-tpu-client",
METRICS_REPORTING_INTERVAL,
cancel.clone(),
cancel,
));
let _handle = runtime_handle.spawn(scheduler.run(config));
Self {
Expand Down
2 changes: 1 addition & 1 deletion core/src/repair/repair_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ mod test {

// Send a repair request
RepairService::request_repair_for_shred_from_address(
cluster_info.clone(),
cluster_info,
pubkey,
address,
slot,
Expand Down
4 changes: 2 additions & 2 deletions core/src/replay_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ impl ReplayStage {

trace!("replay stage");

let mut identity_keypair = cluster_info.keypair().clone();
let mut identity_keypair = cluster_info.keypair();
let mut my_pubkey = identity_keypair.pubkey();

let mut highest_frozen_slot = bank_forks
Expand Down Expand Up @@ -8250,7 +8250,7 @@ pub(crate) mod tests {
// 2) The blockheight is still eligible for a refresh
// This will still not refresh because `MAX_VOTE_REFRESH_INTERVAL_MILLIS` has not expired yet
let expired_bank_sibling = {
let mut parent_bank = bank2.clone();
let mut parent_bank = bank2;
for i in 0..expired_bank_child_slot {
let slot = expired_bank_child.slot() + i + 1;
parent_bank = Bank::new_from_parent_with_bank_forks(
Expand Down
6 changes: 1 addition & 5 deletions core/src/shred_fetch_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ impl ShredFetchStage {
vec![repair_socket],
exit.clone(),
sender.clone(),
recycler.clone(),
recycler,
bank_forks.clone(),
shred_version,
"shred_fetch_repair",
Expand All @@ -309,10 +309,6 @@ impl ShredFetchStage {
// Repair shreds fetched over QUIC protocol.
{
let (packet_sender, packet_receiver) = unbounded();
let bank_forks = bank_forks.clone();
let exit = exit.clone();
let sender = sender.clone();
let turbine_disabled = turbine_disabled.clone();
tvu_threads.extend([
Builder::new()
.name("solTvuRecvRpr".to_string())
Expand Down
2 changes: 1 addition & 1 deletion core/src/tpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ impl Tpu {
"quic_streamer_tpu_vote",
tpu_vote_quic_sockets,
keypair,
vote_packet_sender.clone(),
vote_packet_sender,
staked_nodes.clone(),
vote_quic_server_config.quic_streamer_config,
vote_quic_server_config.qos_config,
Expand Down
2 changes: 1 addition & 1 deletion core/src/tvu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ impl Tvu {
vec![bls_socket],
&cluster_info.keypair(),
bls_packet_sender,
staked_nodes.clone(),
staked_nodes,
quic_server_params,
qos_config,
cancel,
Expand Down
8 changes: 4 additions & 4 deletions core/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ impl Validator {

let (snapshot_request_sender, snapshot_request_receiver) = unbounded();
let snapshot_controller = Arc::new(SnapshotController::new(
snapshot_request_sender.clone(),
snapshot_request_sender,
config.snapshot_config.clone(),
bank_forks.read().unwrap().root(),
));
Expand Down Expand Up @@ -1734,7 +1734,7 @@ impl Validator {
vote_quic: node.sockets.tpu_vote_quic,
vote_forwarding_client: node.sockets.tpu_vote_forwarding_client,
},
rpc_subscriptions.clone(),
rpc_subscriptions,
transaction_status_sender,
entry_notification_sender,
blockstore.clone(),
Expand Down Expand Up @@ -2697,10 +2697,10 @@ fn initialize_rpc_transaction_history_services(
max_complete_transaction_status_slot.clone(),
enable_rpc_transaction_history,
transaction_notifier,
blockstore.clone(),
blockstore,
enable_extended_tx_metadata_storage,
dependency_tracker,
exit.clone(),
exit,
));

TransactionHistoryServices {
Expand Down
2 changes: 1 addition & 1 deletion core/src/window_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ impl WindowService {
repair_socket,
ancestor_hashes_socket,
repair_info,
outstanding_repair_requests.clone(),
outstanding_repair_requests,
repair_service_channels,
);

Expand Down
6 changes: 3 additions & 3 deletions core/tests/snapshots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -634,11 +634,11 @@ fn test_snapshots_with_background_services() {

let exit = Arc::new(AtomicBool::new(false));
let snapshot_packager_service = SnapshotPackagerService::new(
pending_snapshot_packages.clone(),
pending_snapshot_packages,
None,
exit.clone(),
None,
cluster_info.clone(),
cluster_info,
snapshot_controller.clone(),
false,
0,
Expand Down Expand Up @@ -789,7 +789,7 @@ fn test_fastboot_snapshots_teardown(exit_backpressure: bool) {
let bank_forks = snapshot_test_config.bank_forks.clone();

let snapshot_controller = Arc::new(SnapshotController::new(
snapshot_request_sender.clone(),
snapshot_request_sender,
snapshot_test_config.snapshot_config.clone(),
bank_forks.read().unwrap().root(),
));
Expand Down
6 changes: 3 additions & 3 deletions gossip/src/cluster_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2941,7 +2941,7 @@ mod tests {
let refresh_ix = vote_instruction::vote(
&Pubkey::new_unique(), // vote_pubkey
&Pubkey::new_unique(), // authorized_voter_pubkey
refresh_vote.clone(),
refresh_vote,
);
let refresh_tx = Transaction::new_with_payer(
&[refresh_ix], // instructions
Expand All @@ -2958,7 +2958,7 @@ mod tests {
let refresh_ix = vote_instruction::vote(
&Pubkey::new_unique(), // vote_pubkey
&Pubkey::new_unique(), // authorized_voter_pubkey
refresh_vote.clone(),
refresh_vote,
);
let refresh_tx = Transaction::new_with_payer(
&[refresh_ix], // instructions
Expand Down Expand Up @@ -3000,7 +3000,7 @@ mod tests {
// Now construct vote for the slot to be refreshed later.
let refresh_slot = unrefresh_slot + 1;
let refresh_tower = vec![1, 3, unrefresh_slot, refresh_slot];
let refresh_vote = Vote::new(refresh_tower.clone(), Hash::new_unique());
let refresh_vote = Vote::new(refresh_tower, Hash::new_unique());
let refresh_ix = vote_instruction::vote(
&Pubkey::new_unique(), // vote_pubkey
&Pubkey::new_unique(), // authorized_voter_pubkey
Expand Down
4 changes: 2 additions & 2 deletions gossip/src/duplicate_shred_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ mod tests {
{
let mut bank_forks = bank_forks_arc.write().unwrap();
let bank0 = bank_forks.get(0).unwrap();
bank_forks.insert(Bank::new_from_parent(bank0.clone(), &Pubkey::default(), 9));
bank_forks.insert(Bank::new_from_parent(bank0, &Pubkey::default(), 9));
bank_forks.set_root(9, None, None);
}
assert!(blockstore.set_roots([0, 9].iter()).is_ok());
Expand Down Expand Up @@ -395,7 +395,7 @@ mod tests {
{
let mut bank_forks = bank_forks_arc.write().unwrap();
let bank0 = bank_forks.get(0).unwrap();
bank_forks.insert(Bank::new_from_parent(bank0.clone(), &Pubkey::default(), 9));
bank_forks.insert(Bank::new_from_parent(bank0, &Pubkey::default(), 9));
bank_forks.set_root(9, None, None);
}
blockstore.set_roots([0, 9].iter()).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion gossip/src/gossip_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl GossipService {
);
let t_responder = streamer::responder_atomic(
"Gossip",
gossip_sockets.clone(),
gossip_sockets,
cluster_info.bind_ip_addrs(),
response_receiver,
socket_addr_space,
Expand Down
Loading