PR fixes
This commit is contained in:
parent
ccd1173a83
commit
3ddf4b6c24
|
@ -18,7 +18,7 @@ pub struct ContactInfo {
|
|||
pub tvu: SocketAddr,
|
||||
/// transactions address
|
||||
pub tpu: SocketAddr,
|
||||
// forwarer address
|
||||
// forwarder address
|
||||
pub forwarder: SocketAddr,
|
||||
/// storage data address
|
||||
pub storage_addr: SocketAddr,
|
||||
|
|
|
@ -214,8 +214,7 @@ mod test {
|
|||
#[test]
|
||||
fn test_local_cluster_start_and_exit() {
|
||||
solana_logger::setup();
|
||||
let cluster = LocalCluster::new(1, 100, 3);
|
||||
drop(cluster)
|
||||
let _cluster = LocalCluster::new(1, 100, 3);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -223,7 +222,6 @@ mod test {
|
|||
solana_logger::setup();
|
||||
let mut fullnode_exit = FullnodeConfig::default();
|
||||
fullnode_exit.rpc_config.enable_fullnode_exit = true;
|
||||
let cluster = LocalCluster::new_with_config(&[3], 100, &fullnode_exit);
|
||||
drop(cluster)
|
||||
let _cluster = LocalCluster::new_with_config(&[3], 100, &fullnode_exit);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ pub struct Packet {
|
|||
|
||||
impl Packet {
|
||||
pub fn new(data: [u8; PACKET_DATA_SIZE], meta: Meta) -> Self {
|
||||
Packet { data, meta }
|
||||
Self { data, meta }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -246,13 +246,13 @@ mod test {
|
|||
}
|
||||
}
|
||||
#[test]
|
||||
pub fn streamer_debug() {
|
||||
fn streamer_debug() {
|
||||
write!(io::sink(), "{:?}", Packet::default()).unwrap();
|
||||
write!(io::sink(), "{:?}", Packets::default()).unwrap();
|
||||
write!(io::sink(), "{:?}", Blob::default()).unwrap();
|
||||
}
|
||||
#[test]
|
||||
pub fn streamer_send_test() {
|
||||
fn streamer_send_test() {
|
||||
let read = UdpSocket::bind("127.0.0.1:0").expect("bind");
|
||||
read.set_read_timeout(Some(Duration::new(1, 0))).unwrap();
|
||||
|
||||
|
@ -288,7 +288,7 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
pub fn streamer_test_deserialize_packets_in_blob() {
|
||||
fn test_streamer_deserialize_packets_in_blob() {
|
||||
let meta = Meta::default();
|
||||
let serialized_meta_size = serialized_size(&meta).unwrap() as usize;
|
||||
let serialized_packet_size = serialized_meta_size + PACKET_DATA_SIZE;
|
||||
|
|
|
@ -107,14 +107,12 @@ fn test_two_unbalanced_stakes() {
|
|||
cluster.close_preserve_ledgers();
|
||||
let leader_ledger = cluster.ledger_paths[1].clone();
|
||||
cluster_tests::verify_ledger_ticks(&leader_ledger, DEFAULT_TICKS_PER_SLOT as usize);
|
||||
|
||||
drop(cluster);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_forwarding() {
|
||||
// Set up a cluster where one node is never the leader, so all txs sent to this node
|
||||
// will be have to be forwarded
|
||||
// will be have to be forwarded in order to be confirmed
|
||||
let fullnode_config = FullnodeConfig::default();
|
||||
let cluster = LocalCluster::new_with_config(&[999_990, 3], 2_000_000, &fullnode_config);
|
||||
|
||||
|
@ -124,7 +122,7 @@ fn test_forwarding() {
|
|||
let leader_id = cluster.entry_point_info.id;
|
||||
|
||||
let validator_info = cluster_nodes.iter().find(|c| c.id != leader_id).unwrap();
|
||||
cluster_tests::send_many_transactions(&validator_info, &cluster.funding_keypair, 20);
|
||||
|
||||
drop(cluster);
|
||||
// Confirm that transactions were forwarded to and processed by the leader.
|
||||
cluster_tests::send_many_transactions(&validator_info, &cluster.funding_keypair, 20);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue