Add missing error handling: `LedgerError::ParentNotFound` (#630)

This commit is contained in:
Youngjoon Lee 2024-09-13 22:07:47 +09:00 committed by GitHub
parent b7865b27ec
commit d2db454765
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -716,7 +716,8 @@ where
cryptarchia = new_state;
}
Err(Error::Consensus(cryptarchia_engine::Error::ParentMissing(parent))) => {
Err(Error::Ledger(cryptarchia_ledger::LedgerError::ParentNotFound(parent)))
| Err(Error::Consensus(cryptarchia_engine::Error::ParentMissing(parent))) => {
tracing::debug!("missing parent {:?}", parent);
// TODO: request parent block
}