Delete redundant code

This commit is contained in:
Greg Fitzgerald 2019-02-23 16:49:34 -07:00 committed by Grimes
parent 264f502ed7
commit f89e83ae49
2 changed files with 1 additions and 10 deletions

View File

@ -1,4 +1,3 @@
use crate::leader_schedule::LeaderSchedule;
use solana_runtime::bank::Bank;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::timing::DEFAULT_SLOTS_PER_EPOCH;
@ -57,11 +56,7 @@ impl ActiveStakers {
}
pub fn new(bank: &Bank) -> Self {
Self::new_with_bounds(
bank,
DEFAULT_ACTIVE_WINDOW_NUM_SLOTS,
LeaderSchedule::tick_height_to_slot(bank.tick_height(), bank.ticks_per_slot()),
)
Self::new_with_bounds(bank, DEFAULT_ACTIVE_WINDOW_NUM_SLOTS, bank.slot_height())
}
pub fn sorted_stakes(&self) -> Vec<(Pubkey, u64)> {

View File

@ -39,10 +39,6 @@ impl LeaderSchedule {
bank.slots_per_epoch(),
)
}
pub fn tick_height_to_slot(tick_height: u64, ticks_per_slot: u64) -> u64 {
tick_height / ticks_per_slot
}
}
impl Index<usize> for LeaderSchedule {