* Add recent_blockhash to requestAirdrop
* Move tx confirmation to separate method
* Add RpcClient airdrop methods
* Request cli airdrop via RpcClient
* Pass optional faucet_addr into TestValidator and fix tests
* Update client/src/rpc_client.rs
Co-authored-by: Michael Vines <mvines@gmail.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
(cherry picked from commit 7dfb51c0b4
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
This commit is contained in:
@@ -1046,7 +1046,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_process_token_allocations() {
|
||||
let alice = Keypair::new();
|
||||
let test_validator = TestValidator::with_no_fees(alice.pubkey());
|
||||
let test_validator = TestValidator::with_no_fees(alice.pubkey(), None);
|
||||
let url = test_validator.rpc_url();
|
||||
|
||||
let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed());
|
||||
@@ -1056,7 +1056,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_process_transfer_amount_allocations() {
|
||||
let alice = Keypair::new();
|
||||
let test_validator = TestValidator::with_no_fees(alice.pubkey());
|
||||
let test_validator = TestValidator::with_no_fees(alice.pubkey(), None);
|
||||
let url = test_validator.rpc_url();
|
||||
|
||||
let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed());
|
||||
@@ -1066,7 +1066,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_process_stake_allocations() {
|
||||
let alice = Keypair::new();
|
||||
let test_validator = TestValidator::with_no_fees(alice.pubkey());
|
||||
let test_validator = TestValidator::with_no_fees(alice.pubkey(), None);
|
||||
let url = test_validator.rpc_url();
|
||||
|
||||
let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed());
|
||||
@@ -1381,7 +1381,7 @@ mod tests {
|
||||
let fees_in_sol = lamports_to_sol(fees);
|
||||
|
||||
let alice = Keypair::new();
|
||||
let test_validator = TestValidator::with_custom_fees(alice.pubkey(), fees);
|
||||
let test_validator = TestValidator::with_custom_fees(alice.pubkey(), fees, None);
|
||||
let url = test_validator.rpc_url();
|
||||
|
||||
let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed());
|
||||
@@ -1464,7 +1464,7 @@ mod tests {
|
||||
let fees = 10_000;
|
||||
let fees_in_sol = lamports_to_sol(fees);
|
||||
let alice = Keypair::new();
|
||||
let test_validator = TestValidator::with_custom_fees(alice.pubkey(), fees);
|
||||
let test_validator = TestValidator::with_custom_fees(alice.pubkey(), fees, None);
|
||||
let url = test_validator.rpc_url();
|
||||
|
||||
let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed());
|
||||
@@ -1574,7 +1574,7 @@ mod tests {
|
||||
let fees = 10_000;
|
||||
let fees_in_sol = lamports_to_sol(fees);
|
||||
let alice = Keypair::new();
|
||||
let test_validator = TestValidator::with_custom_fees(alice.pubkey(), fees);
|
||||
let test_validator = TestValidator::with_custom_fees(alice.pubkey(), fees, None);
|
||||
let url = test_validator.rpc_url();
|
||||
let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed());
|
||||
|
||||
@@ -1683,7 +1683,7 @@ mod tests {
|
||||
let fees = 10_000;
|
||||
let fees_in_sol = lamports_to_sol(fees);
|
||||
let alice = Keypair::new();
|
||||
let test_validator = TestValidator::with_custom_fees(alice.pubkey(), fees);
|
||||
let test_validator = TestValidator::with_custom_fees(alice.pubkey(), fees, None);
|
||||
let url = test_validator.rpc_url();
|
||||
|
||||
let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed());
|
||||
@@ -1998,7 +1998,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_distribute_allocations_dump_db() {
|
||||
let sender_keypair = Keypair::new();
|
||||
let test_validator = TestValidator::with_no_fees(sender_keypair.pubkey());
|
||||
let test_validator = TestValidator::with_no_fees(sender_keypair.pubkey(), None);
|
||||
let url = test_validator.rpc_url();
|
||||
let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed());
|
||||
|
||||
|
Reference in New Issue
Block a user