This commit is contained in:
Michael Vines
2020-12-13 17:26:34 -08:00
parent 0d139d7ef3
commit 7143aaa89b
102 changed files with 543 additions and 499 deletions

View File

@@ -624,8 +624,10 @@ fn test_star_network_large_push() {
}
#[test]
fn test_prune_errors() {
let mut crds_gossip = CrdsGossip::default();
crds_gossip.id = Pubkey::new(&[0; 32]);
let mut crds_gossip = CrdsGossip {
id: Pubkey::new(&[0; 32]),
..CrdsGossip::default()
};
let id = crds_gossip.id;
let ci = ContactInfo::new_localhost(&Pubkey::new(&[1; 32]), 0);
let prune_pubkey = Pubkey::new(&[2; 32]);

View File

@@ -190,7 +190,7 @@ impl Tower {
.map(|(i, v)| (*scores.get(&v).unwrap_or(&0), v.time, i))
.collect();
// highest score, latest vote first
best.sort();
best.sort_unstable();
if self.parasite {
best.reverse();
}

View File

@@ -284,8 +284,7 @@ fn test_rpc_subscriptions() {
}
}
Err(_err) => {
assert!(
false,
panic!(
"recv_timeout, {}/{} signatures remaining",
signature_set.len(),
transactions.len()
@@ -304,8 +303,7 @@ fn test_rpc_subscriptions() {
account_notifications -= 1;
}
Err(_err) => {
assert!(
false,
panic!(
"recv_timeout, {}/{} accounts remaining",
account_notifications,
transactions.len()