This commit is contained in:
Carl
2019-03-10 17:33:01 -07:00
committed by Pankaj Garg
parent ccd1173a83
commit 3ddf4b6c24
5 changed files with 10 additions and 14 deletions

View File

@@ -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);
}