Fall back to root if highest_confirmed_slot bank does not exist (#11390)
This commit is contained in:
@ -121,7 +121,10 @@ impl JsonRpcRequestProcessor {
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
.highest_confirmed_slot();
|
.highest_confirmed_slot();
|
||||||
debug!("RPC using confirmed slot: {:?}", slot);
|
debug!("RPC using confirmed slot: {:?}", slot);
|
||||||
Ok(r_bank_forks.get(slot).cloned().unwrap())
|
Ok(r_bank_forks
|
||||||
|
.get(slot)
|
||||||
|
.cloned()
|
||||||
|
.unwrap_or_else(|| r_bank_forks.root_bank().clone()))
|
||||||
}
|
}
|
||||||
CommitmentLevel::Max => {
|
CommitmentLevel::Max => {
|
||||||
let cluster_root = self
|
let cluster_root = self
|
||||||
|
Reference in New Issue
Block a user