lighthouse/consensus/state_processing/src/macros.rs

16 lines
358 B
Rust
Raw Normal View History

macro_rules! verify {
($condition: expr, $result: expr) => {
if !$condition {
return Err(crate::per_block_processing::errors::BlockOperationError::invalid($result));
}
};
}
macro_rules! block_verify {
($condition: expr, $result: expr) => {
if !$condition {
return Err($result);
}
};
}