Fix potential crash in banking stage
This commit is contained in:
parent
56fcc93ef5
commit
1be7ee51be
|
@ -150,7 +150,9 @@ impl BankingStage {
|
|||
// Buffer the packets if I am the next leader
|
||||
// or, if it was getting sent to me
|
||||
let leader_id = match poh_recorder.lock().unwrap().bank() {
|
||||
Some(bank) => leader_schedule_utils::slot_leader_at(bank.slot() + 1, &bank).unwrap(),
|
||||
Some(bank) => {
|
||||
leader_schedule_utils::slot_leader_at(bank.slot() + 1, &bank).unwrap_or_default()
|
||||
}
|
||||
None => rcluster_info
|
||||
.leader_data()
|
||||
.map(|x| x.id)
|
||||
|
|
Loading…
Reference in New Issue