Skip to content

Commit

Permalink
style: make it more rusty
Browse files Browse the repository at this point in the history
Signed-off-by: Gustavo Inacio <[email protected]>
  • Loading branch information
gusinacio committed Oct 23, 2024
1 parent 33194ba commit b771356
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/header-accumulator/src/era_validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ impl EraValidator {
let root = epoch_accumulator.tree_hash_root();
let valid_root = self.historical_epochs[epoch.number()];

if root != valid_root {
if root == valid_root {
Ok(root)
} else {
log::error!(
"the valid hash is: {:?} and the provided hash was: {:?}",
valid_root,
root
);
Err(EraValidateError::EraAccumulatorMismatch)?;
Err(EraValidateError::EraAccumulatorMismatch)
}

Ok(root)
}
}

0 comments on commit b771356

Please sign in to comment.