From fe0fd535e89e9a431ab72c51950f9a4dc4885e72 Mon Sep 17 00:00:00 2001 From: ananas-block Date: Sat, 29 Jun 2024 17:30:01 +0100 Subject: [PATCH] chore: increase aidrops in forester --- forester/tests/e2e_test.rs | 4 ++-- forester/tests/empty_address_tree_test.rs | 2 +- forester/tests/interop_address_test.rs | 2 +- test-utils/src/e2e_test_env.rs | 12 ++++-------- test-utils/src/rpc/solana_rpc.rs | 1 + 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/forester/tests/e2e_test.rs b/forester/tests/e2e_test.rs index 1cbb66d9e7..bf39a8ac66 100644 --- a/forester/tests/e2e_test.rs +++ b/forester/tests/e2e_test.rs @@ -56,7 +56,7 @@ async fn test_state_tree_nullifier() { let mut rpc = SolanaRpcConnection::new(SolanaRpcUrl::Localnet, None); - rpc.airdrop_lamports(&rpc.get_payer().pubkey(), LAMPORTS_PER_SOL * 1000) + rpc.airdrop_lamports(&rpc.get_payer().pubkey(), LAMPORTS_PER_SOL * 100_000) .await .unwrap(); @@ -101,7 +101,7 @@ async fn test_1_all() { let env_accounts = get_test_env_accounts(); let mut rpc = SolanaRpcConnection::new(SolanaRpcUrl::Localnet, None); - rpc.airdrop_lamports(&rpc.get_payer().pubkey(), LAMPORTS_PER_SOL * 1000) + rpc.airdrop_lamports(&rpc.get_payer().pubkey(), LAMPORTS_PER_SOL * 100_000) .await .unwrap(); diff --git a/forester/tests/empty_address_tree_test.rs b/forester/tests/empty_address_tree_test.rs index aa84e4a647..ad1bb286c7 100644 --- a/forester/tests/empty_address_tree_test.rs +++ b/forester/tests/empty_address_tree_test.rs @@ -59,7 +59,7 @@ async fn empty_address_tree_test() { let mut rpc = SolanaRpcConnection::new(SolanaRpcUrl::Localnet, None); - rpc.airdrop_lamports(&rpc.get_payer().pubkey(), LAMPORTS_PER_SOL * 1000) + rpc.airdrop_lamports(&rpc.get_payer().pubkey(), LAMPORTS_PER_SOL * 100_000) .await .unwrap(); diff --git a/forester/tests/interop_address_test.rs b/forester/tests/interop_address_test.rs index d5966ce0dd..7e3122fadf 100644 --- a/forester/tests/interop_address_test.rs +++ b/forester/tests/interop_address_test.rs @@ -119,7 +119,7 @@ async fn test_photon_interop_address() { let mut rpc = SolanaRpcConnection::new(services_config.rpc_url, None); // Airdrop because currently TestEnv.new() transfers funds from get_payer. - rpc.airdrop_lamports(&rpc.get_payer().pubkey(), LAMPORTS_PER_SOL * 1000) + rpc.airdrop_lamports(&rpc.get_payer().pubkey(), LAMPORTS_PER_SOL * 100_000) .await .unwrap(); diff --git a/test-utils/src/e2e_test_env.rs b/test-utils/src/e2e_test_env.rs index 6e3cd0070d..c867f35a38 100644 --- a/test-utils/src/e2e_test_env.rs +++ b/test-utils/src/e2e_test_env.rs @@ -212,17 +212,13 @@ where .await; let payer = rpc.get_payer().insecure_clone(); - airdrop_lamports(&mut rpc, &payer.pubkey(), 100_000_000_000_000) + airdrop_lamports(&mut rpc, &payer.pubkey(), 1_000_000_000_000) .await .unwrap(); - airdrop_lamports( - &mut rpc, - &env_accounts.forester.pubkey(), - 100_000_000_000_000, - ) - .await - .unwrap(); + airdrop_lamports(&mut rpc, &env_accounts.forester.pubkey(), 1_000_000_000_000) + .await + .unwrap(); let mut thread_rng = ThreadRng::default(); let random_seed = thread_rng.next_u64(); let seed: u64 = seed.unwrap_or(random_seed); diff --git a/test-utils/src/rpc/solana_rpc.rs b/test-utils/src/rpc/solana_rpc.rs index f04882621b..9ef030f6ea 100644 --- a/test-utils/src/rpc/solana_rpc.rs +++ b/test-utils/src/rpc/solana_rpc.rs @@ -290,6 +290,7 @@ impl RpcConnection for SolanaRpcConnection { .request_airdrop(to, lamports) .map_err(RpcError::from)?; // TODO: Find a different way this can result in an infinite loop + println!("Airdrop signature: {:?}", signature); loop { let confirmed = self .client