adds validator flag to allow private ip addresses (#18850)
This commit is contained in:
@ -39,3 +39,4 @@ bincode = "1.3.3"
|
||||
solana-core = { path = "../core", version = "=1.8.0" }
|
||||
solana-logger = { path = "../logger", version = "=1.8.0" }
|
||||
solana-program-test = { path = "../program-test", version = "=1.8.0" }
|
||||
solana-streamer = { path = "../streamer", version = "=1.8.0" }
|
||||
|
@ -1208,12 +1208,14 @@ mod tests {
|
||||
signature::{read_keypair_file, write_keypair_file, Signer},
|
||||
stake::instruction::StakeInstruction,
|
||||
};
|
||||
use solana_streamer::socket::SocketAddrSpace;
|
||||
use solana_transaction_status::TransactionConfirmationStatus;
|
||||
|
||||
#[test]
|
||||
fn test_process_token_allocations() {
|
||||
let alice = Keypair::new();
|
||||
let test_validator = TestValidator::with_no_fees(alice.pubkey(), None);
|
||||
let test_validator =
|
||||
TestValidator::with_no_fees(alice.pubkey(), None, SocketAddrSpace::Unspecified);
|
||||
let url = test_validator.rpc_url();
|
||||
|
||||
let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed());
|
||||
@ -1223,7 +1225,8 @@ mod tests {
|
||||
#[test]
|
||||
fn test_process_transfer_amount_allocations() {
|
||||
let alice = Keypair::new();
|
||||
let test_validator = TestValidator::with_no_fees(alice.pubkey(), None);
|
||||
let test_validator =
|
||||
TestValidator::with_no_fees(alice.pubkey(), None, SocketAddrSpace::Unspecified);
|
||||
let url = test_validator.rpc_url();
|
||||
|
||||
let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed());
|
||||
@ -1233,7 +1236,8 @@ mod tests {
|
||||
#[test]
|
||||
fn test_create_stake_allocations() {
|
||||
let alice = Keypair::new();
|
||||
let test_validator = TestValidator::with_no_fees(alice.pubkey(), None);
|
||||
let test_validator =
|
||||
TestValidator::with_no_fees(alice.pubkey(), None, SocketAddrSpace::Unspecified);
|
||||
let url = test_validator.rpc_url();
|
||||
|
||||
let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed());
|
||||
@ -1243,7 +1247,8 @@ mod tests {
|
||||
#[test]
|
||||
fn test_process_stake_allocations() {
|
||||
let alice = Keypair::new();
|
||||
let test_validator = TestValidator::with_no_fees(alice.pubkey(), None);
|
||||
let test_validator =
|
||||
TestValidator::with_no_fees(alice.pubkey(), None, SocketAddrSpace::Unspecified);
|
||||
let url = test_validator.rpc_url();
|
||||
|
||||
let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed());
|
||||
@ -1563,7 +1568,12 @@ mod tests {
|
||||
let fees_in_sol = lamports_to_sol(fees);
|
||||
|
||||
let alice = Keypair::new();
|
||||
let test_validator = TestValidator::with_custom_fees(alice.pubkey(), fees, None);
|
||||
let test_validator = TestValidator::with_custom_fees(
|
||||
alice.pubkey(),
|
||||
fees,
|
||||
None,
|
||||
SocketAddrSpace::Unspecified,
|
||||
);
|
||||
let url = test_validator.rpc_url();
|
||||
|
||||
let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed());
|
||||
@ -1646,7 +1656,12 @@ 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, None);
|
||||
let test_validator = TestValidator::with_custom_fees(
|
||||
alice.pubkey(),
|
||||
fees,
|
||||
None,
|
||||
SocketAddrSpace::Unspecified,
|
||||
);
|
||||
let url = test_validator.rpc_url();
|
||||
|
||||
let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed());
|
||||
@ -1761,7 +1776,12 @@ 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, None);
|
||||
let test_validator = TestValidator::with_custom_fees(
|
||||
alice.pubkey(),
|
||||
fees,
|
||||
None,
|
||||
SocketAddrSpace::Unspecified,
|
||||
);
|
||||
let url = test_validator.rpc_url();
|
||||
let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed());
|
||||
|
||||
@ -1870,7 +1890,12 @@ 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, None);
|
||||
let test_validator = TestValidator::with_custom_fees(
|
||||
alice.pubkey(),
|
||||
fees,
|
||||
None,
|
||||
SocketAddrSpace::Unspecified,
|
||||
);
|
||||
let url = test_validator.rpc_url();
|
||||
|
||||
let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed());
|
||||
@ -2185,7 +2210,11 @@ mod tests {
|
||||
#[test]
|
||||
fn test_distribute_allocations_dump_db() {
|
||||
let sender_keypair = Keypair::new();
|
||||
let test_validator = TestValidator::with_no_fees(sender_keypair.pubkey(), None);
|
||||
let test_validator = TestValidator::with_no_fees(
|
||||
sender_keypair.pubkey(),
|
||||
None,
|
||||
SocketAddrSpace::Unspecified,
|
||||
);
|
||||
let url = test_validator.rpc_url();
|
||||
let client = RpcClient::new_with_commitment(url, CommitmentConfig::processed());
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
use solana_client::rpc_client::RpcClient;
|
||||
use solana_core::test_validator::TestValidator;
|
||||
use solana_sdk::signature::{Keypair, Signer};
|
||||
use solana_streamer::socket::SocketAddrSpace;
|
||||
use solana_tokens::commands::test_process_distribute_tokens_with_client;
|
||||
|
||||
#[test]
|
||||
@ -8,7 +9,8 @@ fn test_process_distribute_with_rpc_client() {
|
||||
solana_logger::setup();
|
||||
|
||||
let mint_keypair = Keypair::new();
|
||||
let test_validator = TestValidator::with_no_fees(mint_keypair.pubkey(), None);
|
||||
let test_validator =
|
||||
TestValidator::with_no_fees(mint_keypair.pubkey(), None, SocketAddrSpace::Unspecified);
|
||||
|
||||
let client = RpcClient::new(test_validator.rpc_url());
|
||||
test_process_distribute_tokens_with_client(&client, mint_keypair, None);
|
||||
|
Reference in New Issue
Block a user