bank process_new_epoch takes parent_height (#31820)

This commit is contained in:
Jeff Washington (jwash) 2023-05-30 08:58:40 -05:00 committed by GitHub
parent 588a7a4e53
commit 6c520396cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -1625,7 +1625,12 @@ impl Bank {
let parent_epoch = parent.epoch();
let (_, update_epoch_time_us) = measure_us!({
if parent_epoch < new.epoch() {
new.process_new_epoch(parent_epoch, parent.slot(), reward_calc_tracer);
new.process_new_epoch(
parent_epoch,
parent.slot(),
parent.block_height(),
reward_calc_tracer,
);
} else {
// Save a snapshot of stakes for use in consensus and stake weighted networking
let leader_schedule_epoch = epoch_schedule.get_leader_schedule_epoch(slot);
@ -1684,6 +1689,7 @@ impl Bank {
&mut self,
parent_epoch: Epoch,
parent_slot: Slot,
_parent_height: u64,
reward_calc_tracer: Option<impl RewardCalcTracer>,
) {
let epoch = self.epoch();