mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 04:01:51 +00:00
Start new Error structure in state_processing
This commit is contained in:
8
eth2/state_processing/src/macros.rs
Normal file
8
eth2/state_processing/src/macros.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
#[macro_use]
|
||||
macro_rules! ensure {
|
||||
($condition: expr, $result: ident) => {
|
||||
if !$condition {
|
||||
return Err(Error::Invalid(Invalid::$result));
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user