Add a constructor to generate random pubkeys

This commit is contained in:
Greg Fitzgerald
2019-03-30 21:37:33 -06:00
parent 32683cac7c
commit fcef54d062
51 changed files with 263 additions and 298 deletions

View File

@@ -160,7 +160,7 @@ mod tests {
#[test]
fn test_bank_staked_nodes_at_epoch() {
let pubkey = Keypair::new().pubkey();
let pubkey = Pubkey::new_rand();
let bootstrap_lamports = 2;
let (genesis_block, _) =
GenesisBlock::new_with_leader(bootstrap_lamports, &pubkey, bootstrap_lamports);
@@ -276,8 +276,8 @@ mod tests {
#[test]
fn test_to_delegated_stakes() {
let mut stakes = Vec::new();
let delegate1 = Keypair::new().pubkey();
let delegate2 = Keypair::new().pubkey();
let delegate1 = Pubkey::new_rand();
let delegate2 = Pubkey::new_rand();
// Delegate 1 has stake of 3
for i in 0..3 {