cargo fmt

This commit is contained in:
Michael Vines
2020-10-21 17:57:19 -07:00
parent d8c7d06737
commit 5ad0ccdfe1
26 changed files with 207 additions and 60 deletions

View File

@@ -2872,8 +2872,12 @@ pub mod tests {
let keypair = Keypair::new();
// Create array of two transactions which throw different errors
let account_not_found_tx =
system_transaction::transfer(&keypair, &solana_sdk::pubkey::new_rand(), 42, bank.last_blockhash());
let account_not_found_tx = system_transaction::transfer(
&keypair,
&solana_sdk::pubkey::new_rand(),
42,
bank.last_blockhash(),
);
let account_not_found_sig = account_not_found_tx.signatures[0];
let mut account_loaded_twice = system_transaction::transfer(
&mint_keypair,
@@ -2925,7 +2929,11 @@ pub mod tests {
let bank0 = Arc::new(Bank::new(&genesis_config));
bank0.freeze();
let bank1 = Arc::new(Bank::new_from_parent(&bank0, &solana_sdk::pubkey::new_rand(), 1));
let bank1 = Arc::new(Bank::new_from_parent(
&bank0,
&solana_sdk::pubkey::new_rand(),
1,
));
// The new blockhash is going to be the hash of the last tick in the block
let bank_1_blockhash = bank1.last_blockhash();

View File

@@ -77,7 +77,9 @@ mod tests {
#[test]
fn test_leader_schedule_basic() {
let num_keys = 10;
let stakes: Vec<_> = (0..num_keys).map(|i| (solana_sdk::pubkey::new_rand(), i)).collect();
let stakes: Vec<_> = (0..num_keys)
.map(|i| (solana_sdk::pubkey::new_rand(), i))
.collect();
let seed = solana_sdk::pubkey::new_rand();
let mut seed_bytes = [0u8; 32];
@@ -93,7 +95,9 @@ mod tests {
#[test]
fn test_repeated_leader_schedule() {
let num_keys = 10;
let stakes: Vec<_> = (0..num_keys).map(|i| (solana_sdk::pubkey::new_rand(), i)).collect();
let stakes: Vec<_> = (0..num_keys)
.map(|i| (solana_sdk::pubkey::new_rand(), i))
.collect();
let seed = solana_sdk::pubkey::new_rand();
let mut seed_bytes = [0u8; 32];