Fix potential crash in banking stage
This commit is contained in:
@ -150,7 +150,9 @@ impl BankingStage {
|
|||||||
// Buffer the packets if I am the next leader
|
// Buffer the packets if I am the next leader
|
||||||
// or, if it was getting sent to me
|
// or, if it was getting sent to me
|
||||||
let leader_id = match poh_recorder.lock().unwrap().bank() {
|
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
|
None => rcluster_info
|
||||||
.leader_data()
|
.leader_data()
|
||||||
.map(|x| x.id)
|
.map(|x| x.id)
|
||||||
|
Reference in New Issue
Block a user