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:
@ -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;
|
||||
|
@ -388,7 +388,7 @@ impl ReplayStage {
|
||||
for bank_slot in &active_banks {
|
||||
let bank = bank_forks.read().unwrap().get(*bank_slot).unwrap().clone();
|
||||
*ticks_per_slot = bank.ticks_per_slot();
|
||||
if bank.collector_id() != *my_pubkey {
|
||||
if bank.collector_id() != my_pubkey {
|
||||
Self::replay_blocktree_into_bank(&bank, &blocktree, progress)?;
|
||||
}
|
||||
let max_tick_height = (*bank_slot + 1) * bank.ticks_per_slot() - 1;
|
||||
@ -567,7 +567,7 @@ impl ReplayStage {
|
||||
) {
|
||||
bank.freeze();
|
||||
info!("bank frozen {}", bank.slot());
|
||||
if let Err(e) = slot_full_sender.send((bank.slot(), bank.collector_id())) {
|
||||
if let Err(e) = slot_full_sender.send((bank.slot(), *bank.collector_id())) {
|
||||
trace!("{} slot_full alert failed: {:?}", my_pubkey, e);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user