More fullnode -> validator renaming (#4414)
* s/fullnode_config/validator_config/g * s/FullnodeConfig/ValidatorConfig/g * mv core/lib/fullnode.rs core/lib/validator.rs * s/Fullnode/Validator/g * Add replicator-x.sh * Rename fullnode.md to validator.md * cargo fmt
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
//! The `solana` library implements the Solana high-performance blockchain architecture.
|
||||
//! It includes a full Rust implementation of the architecture (see
|
||||
//! [Fullnode](server/struct.Fullnode.html)) as well as hooks to GPU implementations of its most
|
||||
//! [Validator](server/struct.Validator.html)) as well as hooks to GPU implementations of its most
|
||||
//! paralellizable components (i.e. [SigVerify](sigverify/index.html)). It also includes
|
||||
//! command-line tools to spin up fullnodes and a Rust library
|
||||
//!
|
||||
@ -34,7 +34,6 @@ pub mod cluster_tests;
|
||||
pub mod entry;
|
||||
pub mod erasure;
|
||||
pub mod fetch_stage;
|
||||
pub mod fullnode;
|
||||
pub mod gen_keys;
|
||||
pub mod genesis_utils;
|
||||
pub mod gossip_service;
|
||||
@ -68,6 +67,7 @@ pub mod streamer;
|
||||
pub mod test_tx;
|
||||
pub mod tpu;
|
||||
pub mod tvu;
|
||||
pub mod validator;
|
||||
pub mod window_service;
|
||||
|
||||
#[macro_use]
|
||||
|
@ -2,11 +2,11 @@ use crate::blocktree::{create_new_tmp_ledger, tmp_copy_blocktree};
|
||||
use crate::cluster::Cluster;
|
||||
use crate::cluster_info::{Node, FULLNODE_PORT_RANGE};
|
||||
use crate::contact_info::ContactInfo;
|
||||
use crate::fullnode::{Fullnode, FullnodeConfig};
|
||||
use crate::genesis_utils::{create_genesis_block_with_leader, GenesisBlockInfo};
|
||||
use crate::gossip_service::discover_cluster;
|
||||
use crate::replicator::Replicator;
|
||||
use crate::service::Service;
|
||||
use crate::validator::{Validator, ValidatorConfig};
|
||||
use solana_client::thin_client::create_client;
|
||||
use solana_client::thin_client::ThinClient;
|
||||
use solana_sdk::client::SyncClient;
|
||||
@ -28,7 +28,7 @@ use std::fs::remove_dir_all;
|
||||
use std::io::{Error, ErrorKind, Result};
|
||||
use std::sync::Arc;
|
||||
|
||||
pub struct FullnodeInfo {
|
||||
pub struct ValidatorInfo {
|
||||
pub keypair: Arc<Keypair>,
|
||||
pub voting_keypair: Arc<Keypair>,
|
||||
pub storage_keypair: Arc<Keypair>,
|
||||
@ -52,7 +52,7 @@ impl ReplicatorInfo {
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct ClusterConfig {
|
||||
/// The fullnode config that should be applied to every node in the cluster
|
||||
pub fullnode_config: FullnodeConfig,
|
||||
pub validator_config: ValidatorConfig,
|
||||
/// Number of replicators in the cluster
|
||||
/// Note- replicators will timeout if ticks_per_slot is much larger than the default 8
|
||||
pub num_replicators: usize,
|
||||
@ -71,7 +71,7 @@ pub struct ClusterConfig {
|
||||
impl Default for ClusterConfig {
|
||||
fn default() -> Self {
|
||||
ClusterConfig {
|
||||
fullnode_config: FullnodeConfig::default(),
|
||||
validator_config: ValidatorConfig::default(),
|
||||
num_replicators: 0,
|
||||
num_listeners: 0,
|
||||
node_stakes: vec![],
|
||||
@ -87,12 +87,12 @@ impl Default for ClusterConfig {
|
||||
pub struct LocalCluster {
|
||||
/// Keypair with funding to participate in the network
|
||||
pub funding_keypair: Keypair,
|
||||
pub fullnode_config: FullnodeConfig,
|
||||
pub validator_config: ValidatorConfig,
|
||||
/// Entry point from which the rest of the network can be discovered
|
||||
pub entry_point_info: ContactInfo,
|
||||
pub fullnode_infos: HashMap<Pubkey, FullnodeInfo>,
|
||||
pub listener_infos: HashMap<Pubkey, FullnodeInfo>,
|
||||
fullnodes: HashMap<Pubkey, Fullnode>,
|
||||
pub fullnode_infos: HashMap<Pubkey, ValidatorInfo>,
|
||||
pub listener_infos: HashMap<Pubkey, ValidatorInfo>,
|
||||
fullnodes: HashMap<Pubkey, Validator>,
|
||||
genesis_ledger_path: String,
|
||||
pub genesis_block: GenesisBlock,
|
||||
replicators: Vec<Replicator>,
|
||||
@ -140,7 +140,7 @@ impl LocalCluster {
|
||||
let leader_contact_info = leader_node.info.clone();
|
||||
let leader_storage_keypair = Arc::new(storage_keypair);
|
||||
let leader_voting_keypair = Arc::new(voting_keypair);
|
||||
let leader_server = Fullnode::new(
|
||||
let leader_server = Validator::new(
|
||||
leader_node,
|
||||
&leader_keypair,
|
||||
&leader_ledger_path,
|
||||
@ -148,7 +148,7 @@ impl LocalCluster {
|
||||
&leader_voting_keypair,
|
||||
&leader_storage_keypair,
|
||||
None,
|
||||
&config.fullnode_config,
|
||||
&config.validator_config,
|
||||
);
|
||||
|
||||
let mut fullnodes = HashMap::new();
|
||||
@ -156,7 +156,7 @@ impl LocalCluster {
|
||||
fullnodes.insert(leader_pubkey, leader_server);
|
||||
fullnode_infos.insert(
|
||||
leader_pubkey,
|
||||
FullnodeInfo {
|
||||
ValidatorInfo {
|
||||
keypair: leader_keypair,
|
||||
voting_keypair: leader_voting_keypair,
|
||||
storage_keypair: leader_storage_keypair,
|
||||
@ -173,17 +173,17 @@ impl LocalCluster {
|
||||
genesis_block,
|
||||
fullnode_infos,
|
||||
replicator_infos: HashMap::new(),
|
||||
fullnode_config: config.fullnode_config.clone(),
|
||||
validator_config: config.validator_config.clone(),
|
||||
listener_infos: HashMap::new(),
|
||||
};
|
||||
|
||||
for stake in &config.node_stakes[1..] {
|
||||
cluster.add_validator(&config.fullnode_config, *stake);
|
||||
cluster.add_validator(&config.validator_config, *stake);
|
||||
}
|
||||
|
||||
let listener_config = FullnodeConfig {
|
||||
let listener_config = ValidatorConfig {
|
||||
voting_disabled: true,
|
||||
..config.fullnode_config.clone()
|
||||
..config.validator_config.clone()
|
||||
};
|
||||
(0..config.num_listeners).for_each(|_| cluster.add_validator(&listener_config, 0));
|
||||
|
||||
@ -223,7 +223,7 @@ impl LocalCluster {
|
||||
}
|
||||
}
|
||||
|
||||
fn add_validator(&mut self, fullnode_config: &FullnodeConfig, stake: u64) {
|
||||
fn add_validator(&mut self, validator_config: &ValidatorConfig, stake: u64) {
|
||||
let client = create_client(
|
||||
self.entry_point_info.client_facing_addr(),
|
||||
FULLNODE_PORT_RANGE,
|
||||
@ -237,7 +237,7 @@ impl LocalCluster {
|
||||
let validator_node = Node::new_localhost_with_pubkey(&validator_keypair.pubkey());
|
||||
let ledger_path = tmp_copy_blocktree!(&self.genesis_ledger_path);
|
||||
|
||||
if fullnode_config.voting_disabled {
|
||||
if validator_config.voting_disabled {
|
||||
// setup as a listener
|
||||
info!("listener {} ", validator_pubkey,);
|
||||
} else {
|
||||
@ -266,7 +266,7 @@ impl LocalCluster {
|
||||
}
|
||||
|
||||
let voting_keypair = Arc::new(voting_keypair);
|
||||
let validator_server = Fullnode::new(
|
||||
let validator_server = Validator::new(
|
||||
validator_node,
|
||||
&validator_keypair,
|
||||
&ledger_path,
|
||||
@ -274,15 +274,15 @@ impl LocalCluster {
|
||||
&voting_keypair,
|
||||
&storage_keypair,
|
||||
Some(&self.entry_point_info),
|
||||
&fullnode_config,
|
||||
&validator_config,
|
||||
);
|
||||
|
||||
self.fullnodes
|
||||
.insert(validator_keypair.pubkey(), validator_server);
|
||||
if fullnode_config.voting_disabled {
|
||||
if validator_config.voting_disabled {
|
||||
self.listener_infos.insert(
|
||||
validator_keypair.pubkey(),
|
||||
FullnodeInfo {
|
||||
ValidatorInfo {
|
||||
keypair: validator_keypair,
|
||||
voting_keypair,
|
||||
storage_keypair,
|
||||
@ -292,7 +292,7 @@ impl LocalCluster {
|
||||
} else {
|
||||
self.fullnode_infos.insert(
|
||||
validator_keypair.pubkey(),
|
||||
FullnodeInfo {
|
||||
ValidatorInfo {
|
||||
keypair: validator_keypair,
|
||||
voting_keypair,
|
||||
storage_keypair,
|
||||
@ -522,7 +522,7 @@ impl Cluster for LocalCluster {
|
||||
if pubkey == self.entry_point_info.id {
|
||||
self.entry_point_info = node.info.clone();
|
||||
}
|
||||
let restarted_node = Fullnode::new(
|
||||
let restarted_node = Validator::new(
|
||||
node,
|
||||
&fullnode_info.keypair,
|
||||
&fullnode_info.ledger_path,
|
||||
@ -530,7 +530,7 @@ impl Cluster for LocalCluster {
|
||||
&fullnode_info.voting_keypair,
|
||||
&fullnode_info.storage_keypair,
|
||||
None,
|
||||
&self.fullnode_config,
|
||||
&self.validator_config,
|
||||
);
|
||||
|
||||
self.fullnodes.insert(pubkey, restarted_node);
|
||||
@ -561,13 +561,13 @@ mod test {
|
||||
#[test]
|
||||
fn test_local_cluster_start_and_exit_with_config() {
|
||||
solana_logger::setup();
|
||||
let mut fullnode_config = FullnodeConfig::default();
|
||||
fullnode_config.rpc_config.enable_fullnode_exit = true;
|
||||
fullnode_config.storage_rotate_count = STORAGE_ROTATE_TEST_COUNT;
|
||||
let mut validator_config = ValidatorConfig::default();
|
||||
validator_config.rpc_config.enable_fullnode_exit = true;
|
||||
validator_config.storage_rotate_count = STORAGE_ROTATE_TEST_COUNT;
|
||||
const NUM_NODES: usize = 1;
|
||||
let num_replicators = 1;
|
||||
let config = ClusterConfig {
|
||||
fullnode_config,
|
||||
validator_config,
|
||||
num_replicators,
|
||||
node_stakes: vec![3; NUM_NODES],
|
||||
cluster_lamports: 100,
|
||||
|
@ -32,7 +32,7 @@ use std::sync::{Arc, Mutex, RwLock};
|
||||
use std::thread::Result;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct FullnodeConfig {
|
||||
pub struct ValidatorConfig {
|
||||
pub sigverify_disabled: bool,
|
||||
pub voting_disabled: bool,
|
||||
pub blockstream: Option<String>,
|
||||
@ -40,7 +40,7 @@ pub struct FullnodeConfig {
|
||||
pub account_paths: Option<String>,
|
||||
pub rpc_config: JsonRpcConfig,
|
||||
}
|
||||
impl Default for FullnodeConfig {
|
||||
impl Default for ValidatorConfig {
|
||||
fn default() -> Self {
|
||||
// TODO: remove this, temporary parameter to configure
|
||||
// storage amount differently for test configurations
|
||||
@ -57,7 +57,7 @@ impl Default for FullnodeConfig {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Fullnode {
|
||||
pub struct Validator {
|
||||
pub id: Pubkey,
|
||||
exit: Arc<AtomicBool>,
|
||||
rpc_service: Option<JsonRpcService>,
|
||||
@ -70,7 +70,7 @@ pub struct Fullnode {
|
||||
ip_echo_server: solana_netutil::IpEchoServer,
|
||||
}
|
||||
|
||||
impl Fullnode {
|
||||
impl Validator {
|
||||
pub fn new(
|
||||
mut node: Node,
|
||||
keypair: &Arc<Keypair>,
|
||||
@ -79,7 +79,7 @@ impl Fullnode {
|
||||
voting_keypair: &Arc<Keypair>,
|
||||
storage_keypair: &Arc<Keypair>,
|
||||
entrypoint_info_option: Option<&ContactInfo>,
|
||||
config: &FullnodeConfig,
|
||||
config: &ValidatorConfig,
|
||||
) -> Self {
|
||||
info!("creating bank...");
|
||||
|
||||
@ -321,7 +321,7 @@ pub fn new_banks_from_blocktree(
|
||||
)
|
||||
}
|
||||
|
||||
impl Service for Fullnode {
|
||||
impl Service for Validator {
|
||||
type JoinReturnType = ();
|
||||
|
||||
fn join(self) -> Result<()> {
|
||||
@ -343,7 +343,7 @@ impl Service for Fullnode {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_fullnode_for_tests() -> (Fullnode, ContactInfo, Keypair, String) {
|
||||
pub fn new_validator_for_tests() -> (Validator, ContactInfo, Keypair, String) {
|
||||
use crate::blocktree::create_new_tmp_ledger;
|
||||
use crate::genesis_utils::{create_genesis_block_with_leader, GenesisBlockInfo};
|
||||
|
||||
@ -364,7 +364,7 @@ pub fn new_fullnode_for_tests() -> (Fullnode, ContactInfo, Keypair, String) {
|
||||
|
||||
let voting_keypair = Arc::new(Keypair::new());
|
||||
let storage_keypair = Arc::new(Keypair::new());
|
||||
let node = Fullnode::new(
|
||||
let node = Validator::new(
|
||||
node,
|
||||
&node_keypair,
|
||||
&ledger_path,
|
||||
@ -372,7 +372,7 @@ pub fn new_fullnode_for_tests() -> (Fullnode, ContactInfo, Keypair, String) {
|
||||
&voting_keypair,
|
||||
&storage_keypair,
|
||||
None,
|
||||
&FullnodeConfig::default(),
|
||||
&ValidatorConfig::default(),
|
||||
);
|
||||
discover_cluster(&contact_info.gossip, 1).expect("Node startup failed");
|
||||
(node, contact_info, mint_keypair, ledger_path)
|
||||
@ -399,7 +399,7 @@ mod tests {
|
||||
|
||||
let voting_keypair = Arc::new(Keypair::new());
|
||||
let storage_keypair = Arc::new(Keypair::new());
|
||||
let validator = Fullnode::new(
|
||||
let validator = Validator::new(
|
||||
validator_node,
|
||||
&Arc::new(validator_keypair),
|
||||
&validator_ledger_path,
|
||||
@ -407,7 +407,7 @@ mod tests {
|
||||
&voting_keypair,
|
||||
&storage_keypair,
|
||||
Some(&leader_node.info),
|
||||
&FullnodeConfig::default(),
|
||||
&ValidatorConfig::default(),
|
||||
);
|
||||
validator.close().unwrap();
|
||||
remove_dir_all(validator_ledger_path).unwrap();
|
||||
@ -419,7 +419,7 @@ mod tests {
|
||||
let leader_node = Node::new_localhost_with_pubkey(&leader_keypair.pubkey());
|
||||
|
||||
let mut ledger_paths = vec![];
|
||||
let validators: Vec<Fullnode> = (0..2)
|
||||
let validators: Vec<Validator> = (0..2)
|
||||
.map(|_| {
|
||||
let validator_keypair = Keypair::new();
|
||||
let validator_node = Node::new_localhost_with_pubkey(&validator_keypair.pubkey());
|
||||
@ -430,7 +430,7 @@ mod tests {
|
||||
ledger_paths.push(validator_ledger_path.clone());
|
||||
let voting_keypair = Arc::new(Keypair::new());
|
||||
let storage_keypair = Arc::new(Keypair::new());
|
||||
Fullnode::new(
|
||||
Validator::new(
|
||||
validator_node,
|
||||
&Arc::new(validator_keypair),
|
||||
&validator_ledger_path,
|
||||
@ -438,7 +438,7 @@ mod tests {
|
||||
&voting_keypair,
|
||||
&storage_keypair,
|
||||
Some(&leader_node.info),
|
||||
&FullnodeConfig::default(),
|
||||
&ValidatorConfig::default(),
|
||||
)
|
||||
})
|
||||
.collect();
|
@ -2,9 +2,9 @@ extern crate solana;
|
||||
|
||||
use solana::cluster::Cluster;
|
||||
use solana::cluster_tests;
|
||||
use solana::fullnode::FullnodeConfig;
|
||||
use solana::gossip_service::discover_cluster;
|
||||
use solana::local_cluster::{ClusterConfig, LocalCluster};
|
||||
use solana::validator::ValidatorConfig;
|
||||
use solana_runtime::epoch_schedule::MINIMUM_SLOT_LENGTH;
|
||||
use solana_sdk::poh_config::PohConfig;
|
||||
use solana_sdk::timing;
|
||||
@ -75,12 +75,12 @@ fn test_fullnode_exit_default_config_should_panic() {
|
||||
fn test_fullnode_exit_2() {
|
||||
solana_logger::setup();
|
||||
let num_nodes = 2;
|
||||
let mut fullnode_config = FullnodeConfig::default();
|
||||
fullnode_config.rpc_config.enable_fullnode_exit = true;
|
||||
let mut validator_config = ValidatorConfig::default();
|
||||
validator_config.rpc_config.enable_fullnode_exit = true;
|
||||
let config = ClusterConfig {
|
||||
cluster_lamports: 10_000,
|
||||
node_stakes: vec![100; 2],
|
||||
fullnode_config,
|
||||
validator_config,
|
||||
..ClusterConfig::default()
|
||||
};
|
||||
let local = LocalCluster::new(&config);
|
||||
@ -92,12 +92,12 @@ fn test_fullnode_exit_2() {
|
||||
fn test_leader_failure_4() {
|
||||
solana_logger::setup();
|
||||
let num_nodes = 4;
|
||||
let mut fullnode_config = FullnodeConfig::default();
|
||||
fullnode_config.rpc_config.enable_fullnode_exit = true;
|
||||
let mut validator_config = ValidatorConfig::default();
|
||||
validator_config.rpc_config.enable_fullnode_exit = true;
|
||||
let config = ClusterConfig {
|
||||
cluster_lamports: 10_000,
|
||||
node_stakes: vec![100; 4],
|
||||
fullnode_config: fullnode_config.clone(),
|
||||
validator_config: validator_config.clone(),
|
||||
..ClusterConfig::default()
|
||||
};
|
||||
let local = LocalCluster::new(&config);
|
||||
@ -111,16 +111,16 @@ fn test_leader_failure_4() {
|
||||
#[test]
|
||||
fn test_two_unbalanced_stakes() {
|
||||
solana_logger::setup();
|
||||
let mut fullnode_config = FullnodeConfig::default();
|
||||
let mut validator_config = ValidatorConfig::default();
|
||||
let num_ticks_per_second = 100;
|
||||
let num_ticks_per_slot = 10;
|
||||
let num_slots_per_epoch = MINIMUM_SLOT_LENGTH as u64;
|
||||
|
||||
fullnode_config.rpc_config.enable_fullnode_exit = true;
|
||||
validator_config.rpc_config.enable_fullnode_exit = true;
|
||||
let mut cluster = LocalCluster::new(&ClusterConfig {
|
||||
node_stakes: vec![999_990, 3],
|
||||
cluster_lamports: 1_000_000,
|
||||
fullnode_config: fullnode_config.clone(),
|
||||
validator_config: validator_config.clone(),
|
||||
ticks_per_slot: num_ticks_per_slot,
|
||||
slots_per_epoch: num_slots_per_epoch,
|
||||
poh_config: PohConfig::new_sleep(Duration::from_millis(1000 / num_ticks_per_second)),
|
||||
@ -164,13 +164,13 @@ fn test_forwarding() {
|
||||
|
||||
#[test]
|
||||
fn test_restart_node() {
|
||||
let fullnode_config = FullnodeConfig::default();
|
||||
let validator_config = ValidatorConfig::default();
|
||||
let slots_per_epoch = MINIMUM_SLOT_LENGTH as u64;
|
||||
let ticks_per_slot = 16;
|
||||
let mut cluster = LocalCluster::new(&ClusterConfig {
|
||||
node_stakes: vec![3],
|
||||
cluster_lamports: 100,
|
||||
fullnode_config: fullnode_config.clone(),
|
||||
validator_config: validator_config.clone(),
|
||||
ticks_per_slot,
|
||||
slots_per_epoch,
|
||||
..ClusterConfig::default()
|
||||
|
@ -8,13 +8,13 @@ use bincode::{deserialize, serialize};
|
||||
use solana::blocktree::{create_new_tmp_ledger, Blocktree};
|
||||
use solana::cluster_info::{ClusterInfo, Node, FULLNODE_PORT_RANGE};
|
||||
use solana::contact_info::ContactInfo;
|
||||
use solana::fullnode::FullnodeConfig;
|
||||
use solana::gossip_service::discover_cluster;
|
||||
use solana::local_cluster::{ClusterConfig, LocalCluster};
|
||||
use solana::replicator::Replicator;
|
||||
use solana::replicator::ReplicatorRequest;
|
||||
use solana::storage_stage::STORAGE_ROTATE_TEST_COUNT;
|
||||
use solana::streamer::blob_receiver;
|
||||
use solana::validator::ValidatorConfig;
|
||||
use solana_client::thin_client::create_client;
|
||||
use solana_sdk::genesis_block::create_genesis_block;
|
||||
use solana_sdk::hash::Hash;
|
||||
@ -103,10 +103,10 @@ fn run_replicator_startup_basic(num_nodes: usize, num_replicators: usize) {
|
||||
solana_logger::setup();
|
||||
info!("starting replicator test");
|
||||
|
||||
let mut fullnode_config = FullnodeConfig::default();
|
||||
fullnode_config.storage_rotate_count = STORAGE_ROTATE_TEST_COUNT;
|
||||
let mut validator_config = ValidatorConfig::default();
|
||||
validator_config.storage_rotate_count = STORAGE_ROTATE_TEST_COUNT;
|
||||
let config = ClusterConfig {
|
||||
fullnode_config,
|
||||
validator_config,
|
||||
num_replicators,
|
||||
node_stakes: vec![100; num_nodes],
|
||||
cluster_lamports: 10_000,
|
||||
@ -189,8 +189,8 @@ fn test_replicator_startup_leader_hang() {
|
||||
fn test_replicator_startup_ledger_hang() {
|
||||
solana_logger::setup();
|
||||
info!("starting replicator test");
|
||||
let mut fullnode_config = FullnodeConfig::default();
|
||||
fullnode_config.storage_rotate_count = STORAGE_ROTATE_TEST_COUNT;
|
||||
let mut validator_config = ValidatorConfig::default();
|
||||
validator_config.storage_rotate_count = STORAGE_ROTATE_TEST_COUNT;
|
||||
let cluster = LocalCluster::new_with_equal_stakes(2, 10_000, 100);;
|
||||
|
||||
info!("starting replicator node");
|
||||
@ -217,10 +217,10 @@ fn test_replicator_startup_ledger_hang() {
|
||||
fn test_account_setup() {
|
||||
let num_nodes = 1;
|
||||
let num_replicators = 1;
|
||||
let mut fullnode_config = FullnodeConfig::default();
|
||||
fullnode_config.storage_rotate_count = STORAGE_ROTATE_TEST_COUNT;
|
||||
let mut validator_config = ValidatorConfig::default();
|
||||
validator_config.storage_rotate_count = STORAGE_ROTATE_TEST_COUNT;
|
||||
let config = ClusterConfig {
|
||||
fullnode_config,
|
||||
validator_config,
|
||||
num_replicators,
|
||||
node_stakes: vec![100; num_nodes],
|
||||
cluster_lamports: 10_000,
|
||||
|
@ -3,7 +3,7 @@ use log::*;
|
||||
use reqwest;
|
||||
use reqwest::header::CONTENT_TYPE;
|
||||
use serde_json::{json, Value};
|
||||
use solana::fullnode::new_fullnode_for_tests;
|
||||
use solana::validator::new_validator_for_tests;
|
||||
use solana_client::rpc_client::get_rpc_request_str;
|
||||
use solana_sdk::hash::Hash;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
@ -16,7 +16,7 @@ use std::time::Duration;
|
||||
fn test_rpc_send_tx() {
|
||||
solana_logger::setup();
|
||||
|
||||
let (server, leader_data, alice, ledger_path) = new_fullnode_for_tests();
|
||||
let (server, leader_data, alice, ledger_path) = new_validator_for_tests();
|
||||
let bob_pubkey = Pubkey::new_rand();
|
||||
|
||||
let client = reqwest::Client::new();
|
||||
|
@ -7,7 +7,6 @@ use solana::blocktree::{create_new_tmp_ledger, Blocktree};
|
||||
use solana::cluster_info::{ClusterInfo, Node};
|
||||
use solana::entry::next_entry_mut;
|
||||
use solana::entry::EntrySlice;
|
||||
use solana::fullnode;
|
||||
use solana::genesis_utils::{create_genesis_block_with_leader, GenesisBlockInfo};
|
||||
use solana::gossip_service::GossipService;
|
||||
use solana::packet::index_blobs;
|
||||
@ -17,6 +16,7 @@ use solana::storage_stage::StorageState;
|
||||
use solana::storage_stage::STORAGE_ROTATE_TEST_COUNT;
|
||||
use solana::streamer;
|
||||
use solana::tvu::{Sockets, Tvu};
|
||||
use solana::validator;
|
||||
use solana_runtime::epoch_schedule::MINIMUM_SLOT_LENGTH;
|
||||
use solana_sdk::signature::{Keypair, KeypairUtil};
|
||||
use solana_sdk::system_transaction;
|
||||
@ -94,7 +94,7 @@ fn test_replay() {
|
||||
completed_slots_receiver,
|
||||
leader_schedule_cache,
|
||||
_,
|
||||
) = fullnode::new_banks_from_blocktree(&blocktree_path, None);
|
||||
) = validator::new_banks_from_blocktree(&blocktree_path, None);
|
||||
let working_bank = bank_forks.working_bank();
|
||||
assert_eq!(
|
||||
working_bank.get_balance(&mint_keypair.pubkey()),
|
||||
|
Reference in New Issue
Block a user