Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
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 cli/src/cluster_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ pub fn process_get_epoch_info(rpc_client: &RpcClient, config: &CliConfig) -> Pro
match config.output_format {
OutputFormat::Json | OutputFormat::JsonCompact => {}
_ => {
let epoch_info = cli_epoch_info.epoch_info.clone();
let epoch_info = &cli_epoch_info.epoch_info;
let average_slot_time_ms = rpc_client
.get_recent_performance_samples(Some(60))
.ok()
Expand Down
4 changes: 2 additions & 2 deletions cli/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ pub fn process_show_account(
use_lamports_unit: bool,
) -> ProcessResult {
let account = rpc_client.get_account(account_pubkey)?;
let data = account.data.clone();
let data = &account.data;
let cli_account = CliAccount::new(account_pubkey, &account, use_lamports_unit);

let mut account_string = config.output_format.formatted_string(&cli_account);
Expand All @@ -668,7 +668,7 @@ pub fn process_show_account(
OutputFormat::Display | OutputFormat::DisplayVerbose => {
if let Some(output_file) = output_file {
let mut f = File::create(output_file)?;
f.write_all(&data)?;
f.write_all(data)?;
writeln!(&mut account_string)?;
writeln!(&mut account_string, "Wrote account data to {output_file}")?;
} else if !data.is_empty() {
Expand Down
2 changes: 1 addition & 1 deletion core/src/broadcast_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ pub mod test {
let ticks_per_slot;
let slot;
{
let bank = broadcast_service.bank.clone();
let bank = broadcast_service.bank;
start_tick_height = bank.tick_height();
max_tick_height = bank.max_tick_height();
ticks_per_slot = bank.ticks_per_slot();
Expand Down
2 changes: 1 addition & 1 deletion core/src/broadcast_stage/broadcast_fake_shreds_run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl BroadcastRun for BroadcastFakeShredsRun {
) -> Result<()> {
// 1) Pull entries from banking stage
let receive_results = broadcast_utils::recv_slot_entries(receiver)?;
let bank = receive_results.bank.clone();
let bank = receive_results.bank;
let last_tick_height = receive_results.last_tick_height;

let next_shred_index = blockstore
Expand Down
28 changes: 12 additions & 16 deletions runtime/src/accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2987,24 +2987,20 @@ mod tests {
let counter_clone = counter.clone();
let accounts_clone = accounts_arc.clone();
let exit_clone = exit.clone();
thread::spawn(move || {
let counter_clone = counter_clone.clone();
let exit_clone = exit_clone.clone();
loop {
let txs = vec![writable_tx.clone()];
let results = accounts_clone
.clone()
.lock_accounts(txs.iter(), MAX_TX_ACCOUNT_LOCKS);
for result in results.iter() {
if result.is_ok() {
counter_clone.clone().fetch_add(1, Ordering::SeqCst);
}
}
accounts_clone.unlock_accounts(txs.iter(), &results);
if exit_clone.clone().load(Ordering::Relaxed) {
break;
thread::spawn(move || loop {
let txs = vec![writable_tx.clone()];
let results = accounts_clone
.clone()
.lock_accounts(txs.iter(), MAX_TX_ACCOUNT_LOCKS);
for result in results.iter() {
if result.is_ok() {
counter_clone.clone().fetch_add(1, Ordering::SeqCst);
}
}
accounts_clone.unlock_accounts(txs.iter(), &results);
if exit_clone.clone().load(Ordering::Relaxed) {
break;
}
});
let counter_clone = counter;
for _ in 0..5 {
Expand Down