Add logging in check_blockstore_max_root (#13887)
This commit is contained in:
parent
6705b5a98c
commit
8fd1e55805
|
@ -610,12 +610,17 @@ impl JsonRpcRequestProcessor {
|
|||
T: std::fmt::Debug,
|
||||
{
|
||||
if result.is_err() {
|
||||
if let BlockstoreError::SlotNotRooted = result.as_ref().unwrap_err() {
|
||||
if slot > self.blockstore.max_root() {
|
||||
let err = result.as_ref().unwrap_err();
|
||||
debug!(
|
||||
"check_blockstore_max_root, slot: {:?}, max root: {:?}, err: {:?}",
|
||||
slot,
|
||||
self.blockstore.max_root(),
|
||||
err
|
||||
);
|
||||
if slot >= self.blockstore.max_root() {
|
||||
return Err(RpcCustomError::BlockNotAvailable { slot }.into());
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue