Open youngjoon-lee opened 3 months ago
In which cases do you encounter
cryptarchia_ledger::LedgerError::ParentNotFound
? I would not expect that to happen in a normal execution, as you would first getcryptarchia_engine::Error::ParentMissing
Since we're calling self.ledger.try_update
first before calling self.consensus.receive_block
, the cryptarchia_ledger::LedgerError::ParentNotFound
can be returned.
@zeegomo What do you think about this fix? I still think we need to handle ParentNotFound
as this PR fixes.
I found this when running the fuzz test in #629. If the parent of the block being processed is missing, we may encounter
LedgerError::ParentNotFound
as well ascryptarchia_engine::Error::ParentMissing
. Although the real error handling logic is not implemented yet, I think both errors need to be checked for future implementations.