use highest staked node as bootstrap leader, remove bootstrap_leader from genesis_block (#4635)

* use highest staked node as bootstrap leader, remove bootstrap_leader from genesis_block

* clippy

* fixup

* fixup
This commit is contained in:
Rob Walker
2019-06-11 11:44:58 -07:00
committed by GitHub
parent 6dbba86cc6
commit 3217a1d70c
7 changed files with 45 additions and 14 deletions

View File

@@ -391,7 +391,7 @@ impl Locktower {
let mut lockouts = VoteState::default();
if let Some(iter) = bank.epoch_vote_accounts(current_epoch) {
for (delegate_pubkey, (_, account)) in iter {
if *delegate_pubkey == bank.collector_id() {
if delegate_pubkey == bank.collector_id() {
let state = VoteState::deserialize(&account.data).expect("votes");
if lockouts.votes.len() < state.votes.len() {
lockouts = state;