Remove many uses of legacy term 'fullnode' (#6324)
This commit is contained in:
@ -6,7 +6,7 @@ use solana_client::thin_client::create_client;
|
||||
/// discover the rest of the network.
|
||||
use solana_core::{
|
||||
blocktree::Blocktree,
|
||||
cluster_info::FULLNODE_PORT_RANGE,
|
||||
cluster_info::VALIDATOR_PORT_RANGE,
|
||||
consensus::VOTE_THRESHOLD_DEPTH,
|
||||
contact_info::ContactInfo,
|
||||
entry::{Entry, EntrySlice},
|
||||
@ -47,7 +47,7 @@ pub fn spend_and_verify_all_nodes<S: ::std::hash::BuildHasher>(
|
||||
continue;
|
||||
}
|
||||
let random_keypair = Keypair::new();
|
||||
let client = create_client(ingress_node.client_facing_addr(), FULLNODE_PORT_RANGE);
|
||||
let client = create_client(ingress_node.client_facing_addr(), VALIDATOR_PORT_RANGE);
|
||||
let bal = client
|
||||
.poll_get_balance(&funding_keypair.pubkey())
|
||||
.expect("balance in source");
|
||||
@ -63,7 +63,7 @@ pub fn spend_and_verify_all_nodes<S: ::std::hash::BuildHasher>(
|
||||
if ignore_nodes.contains(&validator.id) {
|
||||
continue;
|
||||
}
|
||||
let client = create_client(validator.client_facing_addr(), FULLNODE_PORT_RANGE);
|
||||
let client = create_client(validator.client_facing_addr(), VALIDATOR_PORT_RANGE);
|
||||
client.poll_for_signature_confirmation(&sig, confs).unwrap();
|
||||
}
|
||||
}
|
||||
@ -73,7 +73,7 @@ pub fn verify_balances<S: ::std::hash::BuildHasher>(
|
||||
expected_balances: HashMap<Pubkey, u64, S>,
|
||||
node: &ContactInfo,
|
||||
) {
|
||||
let client = create_client(node.client_facing_addr(), FULLNODE_PORT_RANGE);
|
||||
let client = create_client(node.client_facing_addr(), VALIDATOR_PORT_RANGE);
|
||||
for (pk, b) in expected_balances {
|
||||
let bal = client.poll_get_balance(&pk).expect("balance in source");
|
||||
assert_eq!(bal, b);
|
||||
@ -86,7 +86,7 @@ pub fn send_many_transactions(
|
||||
max_tokens_per_transfer: u64,
|
||||
num_txs: u64,
|
||||
) -> HashMap<Pubkey, u64> {
|
||||
let client = create_client(node.client_facing_addr(), FULLNODE_PORT_RANGE);
|
||||
let client = create_client(node.client_facing_addr(), VALIDATOR_PORT_RANGE);
|
||||
let mut expected_balances = HashMap::new();
|
||||
for _ in 0..num_txs {
|
||||
let random_keypair = Keypair::new();
|
||||
@ -118,12 +118,12 @@ pub fn fullnode_exit(entry_point_info: &ContactInfo, nodes: usize) {
|
||||
let (cluster_nodes, _) = discover_cluster(&entry_point_info.gossip, nodes).unwrap();
|
||||
assert!(cluster_nodes.len() >= nodes);
|
||||
for node in &cluster_nodes {
|
||||
let client = create_client(node.client_facing_addr(), FULLNODE_PORT_RANGE);
|
||||
let client = create_client(node.client_facing_addr(), VALIDATOR_PORT_RANGE);
|
||||
assert!(client.fullnode_exit().unwrap());
|
||||
}
|
||||
sleep(Duration::from_millis(DEFAULT_SLOT_MILLIS));
|
||||
for node in &cluster_nodes {
|
||||
let client = create_client(node.client_facing_addr(), FULLNODE_PORT_RANGE);
|
||||
let client = create_client(node.client_facing_addr(), VALIDATOR_PORT_RANGE);
|
||||
assert!(client.fullnode_exit().is_err());
|
||||
}
|
||||
}
|
||||
@ -183,7 +183,7 @@ pub fn kill_entry_and_spend_and_verify_rest(
|
||||
solana_logger::setup();
|
||||
let (cluster_nodes, _) = discover_cluster(&entry_point_info.gossip, nodes).unwrap();
|
||||
assert!(cluster_nodes.len() >= nodes);
|
||||
let client = create_client(entry_point_info.client_facing_addr(), FULLNODE_PORT_RANGE);
|
||||
let client = create_client(entry_point_info.client_facing_addr(), VALIDATOR_PORT_RANGE);
|
||||
let first_two_epoch_slots = MINIMUM_SLOTS_PER_EPOCH * 3;
|
||||
|
||||
for ingress_node in &cluster_nodes {
|
||||
@ -210,7 +210,7 @@ pub fn kill_entry_and_spend_and_verify_rest(
|
||||
continue;
|
||||
}
|
||||
|
||||
let client = create_client(ingress_node.client_facing_addr(), FULLNODE_PORT_RANGE);
|
||||
let client = create_client(ingress_node.client_facing_addr(), VALIDATOR_PORT_RANGE);
|
||||
let balance = client
|
||||
.poll_get_balance(&funding_keypair.pubkey())
|
||||
.expect("balance in source");
|
||||
@ -275,7 +275,7 @@ fn poll_all_nodes_for_signature(
|
||||
if validator.id == entry_point_info.id {
|
||||
continue;
|
||||
}
|
||||
let client = create_client(validator.client_facing_addr(), FULLNODE_PORT_RANGE);
|
||||
let client = create_client(validator.client_facing_addr(), VALIDATOR_PORT_RANGE);
|
||||
client.poll_for_signature_confirmation(&sig, confs)?;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@ use crate::cluster::{Cluster, ClusterValidatorInfo, ValidatorInfo};
|
||||
use solana_client::thin_client::{create_client, ThinClient};
|
||||
use solana_core::{
|
||||
blocktree::create_new_tmp_ledger,
|
||||
cluster_info::{Node, FULLNODE_PORT_RANGE},
|
||||
cluster_info::{Node, VALIDATOR_PORT_RANGE},
|
||||
contact_info::ContactInfo,
|
||||
genesis_utils::{create_genesis_block_with_leader, GenesisBlockInfo},
|
||||
gossip_service::discover_cluster,
|
||||
@ -269,7 +269,7 @@ impl LocalCluster {
|
||||
pub fn add_validator(&mut self, validator_config: &ValidatorConfig, stake: u64) {
|
||||
let client = create_client(
|
||||
self.entry_point_info.client_facing_addr(),
|
||||
FULLNODE_PORT_RANGE,
|
||||
VALIDATOR_PORT_RANGE,
|
||||
);
|
||||
|
||||
// Must have enough tokens to fund vote account and set delegate
|
||||
@ -350,7 +350,7 @@ impl LocalCluster {
|
||||
let storage_pubkey = storage_keypair.pubkey();
|
||||
let client = create_client(
|
||||
self.entry_point_info.client_facing_addr(),
|
||||
FULLNODE_PORT_RANGE,
|
||||
VALIDATOR_PORT_RANGE,
|
||||
);
|
||||
|
||||
// Give the replicator some lamports to setup its storage accounts
|
||||
@ -397,7 +397,7 @@ impl LocalCluster {
|
||||
pub fn transfer(&self, source_keypair: &Keypair, dest_pubkey: &Pubkey, lamports: u64) -> u64 {
|
||||
let client = create_client(
|
||||
self.entry_point_info.client_facing_addr(),
|
||||
FULLNODE_PORT_RANGE,
|
||||
VALIDATOR_PORT_RANGE,
|
||||
);
|
||||
Self::transfer_with_client(&client, source_keypair, dest_pubkey, lamports)
|
||||
}
|
||||
@ -574,7 +574,7 @@ impl Cluster for LocalCluster {
|
||||
self.fullnode_infos.get(pubkey).map(|f| {
|
||||
create_client(
|
||||
f.info.contact_info.client_facing_addr(),
|
||||
FULLNODE_PORT_RANGE,
|
||||
VALIDATOR_PORT_RANGE,
|
||||
)
|
||||
})
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ use serial_test_derive::serial;
|
||||
use solana_bench_tps::bench::{do_bench_tps, generate_and_fund_keypairs};
|
||||
use solana_bench_tps::cli::Config;
|
||||
use solana_client::thin_client::create_client;
|
||||
use solana_core::cluster_info::FULLNODE_PORT_RANGE;
|
||||
use solana_core::cluster_info::VALIDATOR_PORT_RANGE;
|
||||
use solana_core::validator::ValidatorConfig;
|
||||
use solana_drone::drone::run_local_drone;
|
||||
#[cfg(feature = "move")]
|
||||
@ -38,7 +38,7 @@ fn test_bench_tps_local_cluster(config: Config) {
|
||||
|
||||
let client = create_client(
|
||||
(cluster.entry_point_info.rpc, cluster.entry_point_info.tpu),
|
||||
FULLNODE_PORT_RANGE,
|
||||
VALIDATOR_PORT_RANGE,
|
||||
);
|
||||
|
||||
let (addr_sender, addr_receiver) = channel();
|
||||
|
@ -2,7 +2,7 @@ use crate::local_cluster::{ClusterConfig, LocalCluster};
|
||||
use serial_test_derive::serial;
|
||||
use solana_client::thin_client::create_client;
|
||||
use solana_core::blocktree::{create_new_tmp_ledger, get_tmp_ledger_path, Blocktree};
|
||||
use solana_core::cluster_info::{ClusterInfo, Node, FULLNODE_PORT_RANGE};
|
||||
use solana_core::cluster_info::{ClusterInfo, Node, VALIDATOR_PORT_RANGE};
|
||||
use solana_core::contact_info::ContactInfo;
|
||||
use solana_core::gossip_service::discover_cluster;
|
||||
use solana_core::replicator::Replicator;
|
||||
@ -171,7 +171,7 @@ fn test_account_setup() {
|
||||
// now check that the cluster actually has accounts for the replicator.
|
||||
let client = create_client(
|
||||
cluster.entry_point_info.client_facing_addr(),
|
||||
FULLNODE_PORT_RANGE,
|
||||
VALIDATOR_PORT_RANGE,
|
||||
);
|
||||
cluster.replicator_infos.iter().for_each(|(_, value)| {
|
||||
assert_eq!(
|
||||
|
Reference in New Issue
Block a user