mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix(engine): fail on canonical errors (#2565)
This commit is contained in:
@ -63,3 +63,10 @@ pub enum Error {
|
||||
#[error("Missing total difficulty")]
|
||||
MissingTotalDifficulty { hash: H256 },
|
||||
}
|
||||
|
||||
impl Error {
|
||||
/// Returns `true` if the error is fatal.
|
||||
pub fn is_fatal(&self) -> bool {
|
||||
matches!(self, Self::CanonicalCommit { .. } | Self::CanonicalRevert { .. })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user