Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
yihau committed Feb 2, 2025
1 parent 77b6b2a commit aede39d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion runtime/src/bank/recent_blockhashes_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ mod tests {
#![allow(deprecated)]
use {
super::*,
rand::{seq::SliceRandom, rng},
rand::{rng, seq::SliceRandom},
solana_sdk::{
account::{from_account, DUMMY_INHERITABLE_ACCOUNT_FIELDS},
hash::{Hash, HASH_BYTES},
Expand Down
13 changes: 6 additions & 7 deletions runtime/src/bank/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6529,13 +6529,12 @@ fn test_fuzz_instructions() {
rng().random_range(0..max)
};

let num_readonly_unsigned_accounts = if rng().random_ratio(1, 5)
|| (num_required_signatures as usize) >= account_keys_len
{
rng().random_range(0..account_keys_len) as u8
} else {
rng().random_range(0..account_keys_len - num_required_signatures as usize) as u8
};
let num_readonly_unsigned_accounts =
if rng().random_ratio(1, 5) || (num_required_signatures as usize) >= account_keys_len {
rng().random_range(0..account_keys_len) as u8
} else {
rng().random_range(0..account_keys_len - num_required_signatures as usize) as u8
};

let header = MessageHeader {
num_required_signatures,
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/stakes/serde_stakes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ mod tests {
let vote_pubkey = solana_pubkey::new_rand();
let vote_account = vote_state::create_account(
&vote_pubkey,
&solana_pubkey::new_rand(), // node_pubkey
&solana_pubkey::new_rand(), // node_pubkey
rng.random_range(0..101), // commission
rng.random_range(0..1_000_000), // lamports
);
Expand Down
2 changes: 1 addition & 1 deletion validator/src/bootstrap.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use {
itertools::Itertools,
log::*,
rand::{seq::SliceRandom, rng, Rng},
rand::{rng, seq::SliceRandom, Rng},
rayon::prelude::*,
solana_core::validator::{ValidatorConfig, ValidatorStartProgress},
solana_download_utils::{download_snapshot_archive, DownloadProgressRecord},
Expand Down
2 changes: 1 addition & 1 deletion validator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use {
console::style,
crossbeam_channel::unbounded,
log::*,
rand::{seq::SliceRandom, rng},
rand::{rng, seq::SliceRandom},
solana_accounts_db::{
accounts_db::{AccountShrinkThreshold, AccountsDb, AccountsDbConfig, CreateAncientStorage},
accounts_file::StorageAccess,
Expand Down

0 comments on commit aede39d

Please sign in to comment.