Skip to content

Commit c96e791

Browse files
wip
1 parent a3fa9f9 commit c96e791

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/block.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,10 @@ pub fn execute_block(context: BlockContext) -> Option<BlockEffects> {
558558
let l_sched = leader_schedule_utils::leader_schedule(current_epoch, &bank).unwrap();
559559
let epoch_schedule = bank.epoch_schedule();
560560
let (_, slot_index) = epoch_schedule.get_epoch_and_slot_index(current_slot);
561-
let leader = l_sched.get_vote_key_at_slot_index(slot_index as usize).unwrap();
562-
bank.set_collector_id_for_tests(leader.clone());
561+
let leader = l_sched.get_vote_key_at_slot_index(slot_index as usize);
562+
if !leader.is_none() {
563+
bank.set_collector_id_for_tests(leader.unwrap().clone());
564+
}
563565

564566
bank.distribute_partitioned_epoch_rewards();
565567

0 commit comments

Comments
 (0)