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
4 changes: 2 additions & 2 deletions accounts-db/src/accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1384,9 +1384,9 @@ mod tests {
}

// ww conflict in-batch succeeds or fails based on feature
let accounts = Accounts::new(accounts_db.clone());
let accounts = Accounts::new(accounts_db);
let results = accounts.lock_accounts(
[w_tx.clone(), r_tx.clone()].iter(),
[w_tx, r_tx].iter(),
[Ok(()), Ok(())].into_iter(),
MAX_TX_ACCOUNT_LOCKS,
relax_intrabatch_account_locks,
Expand Down
2 changes: 1 addition & 1 deletion core/benches/banking_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ fn bench_banking(
let (s, _r) = unbounded();
let _banking_stage = BankingStage::new_num_threads(
block_production_method,
poh_recorder.clone(),
poh_recorder,
transaction_recorder,
non_vote_receiver,
tpu_vote_receiver,
Expand Down
2 changes: 1 addition & 1 deletion core/benches/receive_and_buffer_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ pub fn setup_receive_and_buffer<T: ReceiveAndBuffer + ReceiveAndBufferCreator>(

let txs = generate_transactions(
num_txs,
bank.clone(),
bank,
&fee_payers,
num_instructions_per_tx,
probability_invalid_blockhash,
Expand Down
4 changes: 2 additions & 2 deletions core/src/banking_simulation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ impl BankingSimulator {
.expect("should bind");
let broadcast_stage = BroadcastStageType::Standard.new_broadcast_stage(
vec![socket],
cluster_info_for_broadcast.clone(),
cluster_info_for_broadcast,
entry_receiver,
retransmit_slots_receiver,
exit.clone(),
Expand All @@ -856,7 +856,7 @@ impl BankingSimulator {

info!("Start banking stage!...");
let banking_stage = BankingStage::new_num_threads(
block_production_method.clone(),
block_production_method,
poh_recorder.clone(),
transaction_recorder,
non_vote_receiver,
Expand Down
10 changes: 5 additions & 5 deletions core/src/banking_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ mod tests {

let banking_stage = BankingStage::new_num_threads(
BlockProductionMethod::CentralScheduler,
poh_recorder.clone(),
poh_recorder,
transaction_recorder,
non_vote_receiver,
tpu_vote_receiver,
Expand Down Expand Up @@ -1126,7 +1126,7 @@ mod tests {
transaction_recorder,
poh_service,
entry_receiver,
) = create_test_recorder(bank.clone(), blockstore, None, None);
) = create_test_recorder(bank, blockstore, None, None);
let (replay_vote_sender, _replay_vote_receiver) = unbounded();

let banking_stage = BankingStage::new_num_threads(
Expand All @@ -1144,7 +1144,7 @@ mod tests {
None,
replay_vote_sender,
None,
bank_forks.clone(), // keep a local-copy of bank-forks so worker threads do not lose weak access to bank-forks
Comment thread
steviez marked this conversation as resolved.
bank_forks, // keep a local-copy of bank-forks so worker threads do not lose weak access to bank-forks
None,
);

Expand Down Expand Up @@ -1285,7 +1285,7 @@ mod tests {
) = create_test_recorder(bank.clone(), blockstore, None, None);
let banking_stage = BankingStage::new_num_threads(
BlockProductionMethod::CentralScheduler,
poh_recorder.clone(),
poh_recorder,
transaction_recorder,
non_vote_receiver,
tpu_vote_receiver,
Expand Down Expand Up @@ -1438,7 +1438,7 @@ mod tests {

let banking_stage = BankingStage::new_num_threads(
BlockProductionMethod::CentralScheduler,
poh_recorder.clone(),
poh_recorder,
transaction_recorder,
non_vote_receiver,
tpu_vote_receiver,
Expand Down
4 changes: 2 additions & 2 deletions core/src/banking_stage/consumer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ mod tests {
let commit_results = status_batch
.commit_results
.into_iter()
.map(|r| r.unwrap().status.clone())
.map(|r| r.unwrap().status)
.collect::<Vec<_>>();
assert_eq!(
commit_results,
Expand Down Expand Up @@ -1448,7 +1448,7 @@ mod tests {

let tx = VersionedTransaction::try_new(message, &[&keypair]).unwrap();
let sanitized_tx = RuntimeTransaction::try_create(
tx.clone(),
tx,
MessageHash::Compute,
Some(false),
bank.as_ref(),
Expand Down
4 changes: 2 additions & 2 deletions core/src/banking_trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ impl BankingTracer {
let (gossip_vote_sender, gossip_vote_receiver) = Self::channel(
ChannelLabel::GossipVote,
self.active_tracer.as_ref().cloned(),
Some(unified_sender.clone()),
Some(is_unified.clone()),
Some(unified_sender),
Some(is_unified),
);

Channels {
Expand Down
2 changes: 1 addition & 1 deletion core/src/block_creation_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ fn start_loop(config: BlockCreationLoopConfig) {
highest_parent_ready,
blockstore,
record_receiver,
poh_recorder: poh_recorder.clone(),
poh_recorder,
leader_schedule_cache,
bank_forks,
rpc_subscriptions,
Expand Down
6 changes: 3 additions & 3 deletions core/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1667,7 +1667,7 @@ impl Validator {
Some(snapshot_controller.clone()),
config.runtime_config.log_messages_bytes_limit,
prioritization_fee_cache.clone(),
banking_tracer.clone(),
banking_tracer,
repair_response_quic_receiver,
repair_quic_async_senders.repair_request_quic_sender,
repair_quic_async_senders.ancestor_hashes_request_quic_sender,
Expand All @@ -1678,8 +1678,8 @@ impl Validator {
vote_connection_cache,
AlpenglowInitializationState {
leader_window_info_sender,
replay_highest_frozen: replay_highest_frozen.clone(),
highest_parent_ready: highest_parent_ready.clone(),
replay_highest_frozen,
highest_parent_ready,
votor_event_sender: votor_event_sender.clone(),
votor_event_receiver,
cancel: cancel.clone(),
Expand Down
4 changes: 2 additions & 2 deletions core/tests/scheduler_cost_adjustment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ fn test_builtin_ix_cost_adjustment_with_memo_no_cu_limit() {
};
assert_eq!(
expected,
test_setup.execute_test_transaction(&[test_setup.transfer_ix(), memo_ix.clone()],)
test_setup.execute_test_transaction(&[test_setup.transfer_ix(), memo_ix],)
);
}

Expand Down Expand Up @@ -310,7 +310,7 @@ fn test_builtin_ix_cost_adjustment_with_memo_and_cu_limit() {
expected,
test_setup.execute_test_transaction(&[
test_setup.transfer_ix(),
memo_ix.clone(),
memo_ix,
test_setup.set_cu_limit_ix(cu_limit)
],)
);
Expand Down
10 changes: 5 additions & 5 deletions core/tests/snapshots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl SnapshotTestConfig {
..SnapshotConfig::default()
};
SnapshotTestConfig {
bank_forks: bank_forks_arc.clone(),
bank_forks: bank_forks_arc,
genesis_config_info,
snapshot_config,
incremental_snapshot_archives_dir,
Expand Down Expand Up @@ -174,7 +174,7 @@ where
let pending_snapshot_packages = Arc::new(Mutex::new(PendingSnapshotPackages::default()));
let (snapshot_request_sender, snapshot_request_receiver) = unbounded();
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 Expand Up @@ -401,7 +401,7 @@ fn test_bank_forks_incremental_snapshot() {
let pending_snapshot_packages = Arc::new(Mutex::new(PendingSnapshotPackages::default()));
let (snapshot_request_sender, snapshot_request_receiver) = unbounded();
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 Expand Up @@ -615,7 +615,7 @@ fn test_snapshots_with_background_services() {
}

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 Expand Up @@ -803,7 +803,7 @@ fn test_fastboot_snapshots_teardown(exit_backpressure: bool) {
None,
exit.clone(),
exit_backpressure.clone(),
cluster_info.clone(),
cluster_info,
snapshot_controller.clone(),
false,
0,
Expand Down
2 changes: 1 addition & 1 deletion core/tests/unified_scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ fn test_scheduler_producing_blocks() {
signal_receiver,
) = create_test_recorder(
genesis_bank.clone(),
blockstore.clone(),
blockstore,
None,
Some(leader_schedule_cache),
);
Expand Down
8 changes: 4 additions & 4 deletions ledger/src/blockstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4936,7 +4936,7 @@ pub fn create_new_ledger(
let blockstore = Blockstore::open_with_options(
ledger_path,
BlockstoreOptions {
column_options: column_options.clone(),
column_options,
..BlockstoreOptions::default()
},
)?;
Expand Down Expand Up @@ -11353,7 +11353,7 @@ pub mod tests {

assert!(
blockstore
.insert_shred_return_duplicate(next_slot_data_shred.clone(), &leader_schedule,)
.insert_shred_return_duplicate(next_slot_data_shred, &leader_schedule,)
.is_empty()
);

Expand Down Expand Up @@ -11412,7 +11412,7 @@ pub mod tests {
// Should not check again, even though this shred conflicts as well
assert!(
blockstore
.insert_shred_return_duplicate(data_shred.clone(), &leader_schedule,)
.insert_shred_return_duplicate(data_shred, &leader_schedule,)
.is_empty()
);
}
Expand Down Expand Up @@ -11464,7 +11464,7 @@ pub mod tests {
// Should not check again, even though this shred conflicts as well
assert!(
blockstore
.insert_shred_return_duplicate(coding_shred.clone(), &leader_schedule,)
.insert_shred_return_duplicate(coding_shred, &leader_schedule,)
.is_empty()
);
}
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/blockstore_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,7 @@ pub mod tests {

// Reopen the database which has logic to delete program_costs column
{
let _rocks = Rocks::open(db_path.to_path_buf(), options.clone()).unwrap();
let _rocks = Rocks::open(db_path.to_path_buf(), options).unwrap();
}

// The deprecated column should have been dropped by Rocks::open()
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/blockstore_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ pub fn test_process_blockstore(
None,
None,
None,
exit.clone(),
exit,
)
.unwrap();

Expand Down
10 changes: 5 additions & 5 deletions programs/vote/benches/vote_instructions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ impl BenchWithdraw {
let (vote_pubkey, vote_account) = create_test_account();
let authorized_withdrawer_pubkey = solana_pubkey::new_rand();
let transaction_accounts = vec![
(vote_pubkey, vote_account.clone()),
(vote_pubkey, vote_account),
(sysvar::clock::id(), create_default_clock_account()),
(sysvar::rent::id(), create_default_rent_account()),
(authorized_withdrawer_pubkey, AccountSharedData::default()),
Expand Down Expand Up @@ -939,8 +939,8 @@ impl BenchCompactUpdateVoteState {
};

let transaction_accounts = vec![
(vote_pubkey, vote_account.clone()),
(sysvar::slot_hashes::id(), slot_hashes_account.clone()),
(vote_pubkey, vote_account),
(sysvar::slot_hashes::id(), slot_hashes_account),
(sysvar::clock::id(), create_default_clock_account()),
];

Expand Down Expand Up @@ -1002,8 +1002,8 @@ impl BenchTowerSync {
};

let transaction_accounts = vec![
(vote_pubkey, vote_account.clone()),
(sysvar::slot_hashes::id(), slot_hashes_account.clone()),
(vote_pubkey, vote_account),
(sysvar::slot_hashes::id(), slot_hashes_account),
(sysvar::clock::id(), create_default_clock_account()),
];

Expand Down
Loading
Loading