diff --git a/src/crdt.rs b/src/crdt.rs index 73fb445e82..7d78714e79 100644 --- a/src/crdt.rs +++ b/src/crdt.rs @@ -1597,12 +1597,12 @@ mod tests { } #[test] fn replicated_data_new_leader_with_pubkey() { - let kp = Keypair::new(); + let keypair = Keypair::new(); let d1 = NodeInfo::new_leader_with_pubkey( - kp.pubkey().clone(), + keypair.pubkey().clone(), &"127.0.0.1:1234".parse().unwrap(), ); - assert_eq!(d1.id, kp.pubkey()); + assert_eq!(d1.id, keypair.pubkey()); assert_eq!(d1.contact_info.ncp, "127.0.0.1:1235".parse().unwrap()); assert_eq!(d1.contact_info.tvu, "127.0.0.1:1236".parse().unwrap()); assert_eq!(d1.contact_info.rpu, "127.0.0.1:1237".parse().unwrap()); diff --git a/src/fullnode.rs b/src/fullnode.rs index 39857e85d8..21f5106837 100644 --- a/src/fullnode.rs +++ b/src/fullnode.rs @@ -382,13 +382,13 @@ mod tests { #[test] fn validator_exit() { - let kp = Keypair::new(); - let tn = TestNode::new_localhost_with_pubkey(kp.pubkey()); + let keypair = Keypair::new(); + let tn = TestNode::new_localhost_with_pubkey(keypair.pubkey()); let alice = Mint::new(10_000); let bank = Bank::new(&alice); let exit = Arc::new(AtomicBool::new(false)); let entry = tn.data.clone(); - let v = FullNode::new_validator(kp, bank, 0, None, tn, &entry, exit, None, false); + let v = FullNode::new_validator(keypair, bank, 0, None, tn, &entry, exit, None, false); v.exit(); v.join().unwrap(); } @@ -396,13 +396,13 @@ mod tests { fn validator_parallel_exit() { let vals: Vec = (0..2) .map(|_| { - let kp = Keypair::new(); - let tn = TestNode::new_localhost_with_pubkey(kp.pubkey()); + let keypair = Keypair::new(); + let tn = TestNode::new_localhost_with_pubkey(keypair.pubkey()); let alice = Mint::new(10_000); let bank = Bank::new(&alice); let exit = Arc::new(AtomicBool::new(false)); let entry = tn.data.clone(); - FullNode::new_validator(kp, bank, 0, None, tn, &entry, exit, None, false) + FullNode::new_validator(keypair, bank, 0, None, tn, &entry, exit, None, false) }) .collect(); //each validator can exit in parallel to speed many sequential calls to `join`