_id => _pubkey variable renaming (#4419)

* wallet: rename *_account_id to *_account_pubkey

* s/from_id/from_pubkey/g

* s/node_id/node_pubkey/g

* s/stake_id/stake_pubkey/g

* s/voter_id/voter_pubkey/g

* s/vote_id/vote_pubkey/g

* s/delegate_id/delegate_pubkey/g

* s/account_id/account_pubkey/g

* s/to_id/to_pubkey/g

* s/my_id/my_pubkey/g

* cargo fmt

* s/staker_id/staker_pubkey/g

* s/mining_pool_id/mining_pool_pubkey/g

* s/leader_id/leader_pubkey/g

* cargo fmt

* s/funding_id/funding_pubkey/g
This commit is contained in:
Michael Vines
2019-05-23 23:20:04 -07:00
committed by GitHub
parent 94beb4b8c2
commit cfe5afd34c
42 changed files with 697 additions and 620 deletions

View File

@ -385,13 +385,13 @@ mod tests {
let cache = Arc::new(LeaderScheduleCache::new_from_bank(&bank));
// Create new vote account
let node_id = Pubkey::new_rand();
let vote_id = Pubkey::new_rand();
let node_pubkey = Pubkey::new_rand();
let vote_pubkey = Pubkey::new_rand();
setup_vote_and_stake_accounts(
&bank,
&mint_keypair,
&vote_id,
&node_id,
&vote_pubkey,
&node_pubkey,
BOOTSTRAP_LEADER_LAMPORTS,
);
@ -412,14 +412,14 @@ mod tests {
let schedule = cache.compute_epoch_schedule(epoch, &bank).unwrap();
let mut index = 0;
while schedule[index] != node_id {
while schedule[index] != node_pubkey {
index += 1;
assert_ne!(index, genesis_block.slots_per_epoch);
}
expected_slot += index;
assert_eq!(
cache.next_leader_slot(&node_id, 0, &bank, None),
cache.next_leader_slot(&node_pubkey, 0, &bank, None),
Some(expected_slot),
);
}