Skip to content

Commit

Permalink
fix error msg (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
ermalkaleci authored Sep 29, 2023
1 parent 5d1019c commit 7685e26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/extensions/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ pub(crate) fn validate_new_head(
) -> anyhow::Result<()> {
if let Some((current_hash, current_number)) = tx.borrow().as_ref() {
if *current_number > number {
return Err(anyhow::Error::msg("Head number is not increasing, current_number: {current_number} new_number: {number}"));
return Err(anyhow::Error::msg(format!("Head number is not increasing, current_number: {current_number} new_number: {number}")));
}

if *current_number == number && current_hash != hash {
return Err(anyhow::Error::msg(
"Head number is the same but hash is not matching, current_hash: {current_hash} new_hash: {hash}"
format!("Head number is the same but hash is not matching, current_hash: {current_hash} new_hash: {hash}")
));
}
}
Expand Down

0 comments on commit 7685e26

Please sign in to comment.