Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Adjust error matching logic after Tyera set me straight
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Czabaniuk committed Nov 6, 2023
1 parent 8e0db68 commit a2c49c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rpc/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1013,11 +1013,11 @@ impl JsonRpcRequestProcessor {
) -> Result<()> {
match result {
// The slot was found, all good
Ok(Some(_)) => Ok(()),
Ok(_) => Ok(()),
// The slot was cleaned up, return Ok() for now to allow fallback to bigtable
Err(BlockstoreError::SlotCleanedUp) => Ok(()),
// The slot was not cleaned up but also not found
Ok(_) => {
Err(BlockstoreError::SlotNotRooted) => {
let max_root = self.blockstore.max_root();
debug!("check_blockstore_bounds, slot: {slot}, max root: {max_root}");
// Our node hasn't seen this slot yet, error out
Expand All @@ -1030,6 +1030,7 @@ impl JsonRpcRequestProcessor {
// largest root. Thus, the slot must have been skipped and we can error out.
Err(RpcCustomError::SlotSkipped { slot }.into())
}
// Some other Blockstore error, ignore for now
_ => Ok(()),
}
}
Expand Down

0 comments on commit a2c49c1

Please sign in to comment.