fix: return engine on fatal error (#4184)

This commit is contained in:
Matthias Seitz
2023-08-14 19:26:39 +02:00
committed by GitHub
parent 6eb170f8d7
commit 3c41e9ffc7
2 changed files with 35 additions and 6 deletions

View File

@ -61,6 +61,8 @@ pub enum BlockExecutionError {
impl BlockExecutionError {
/// Returns `true` if the error is fatal.
///
/// This represents an unrecoverable database related error.
pub fn is_fatal(&self) -> bool {
matches!(self, Self::CanonicalCommit { .. } | Self::CanonicalRevert { .. })
}