Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
fix: solve error very large warning
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrohba1 committed Jan 23, 2024
1 parent 6a3659d commit 6a4c39d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/headers/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ pub enum BlockHeaderError {
JsonError(#[from] serde_json::Error),
#[error("Invalid input")]
InvalidInput,
#[error("Mismatched roots: expected {0:?}, got {1:?}")]
MismatchedRoots(BlockHeaderRoots, BlockHeaderRoots),
#[error("Mismatched roots")]
MismatchedRoots(Box<(BlockHeaderRoots, BlockHeaderRoots)>),
#[error("Missing header")]
MissingHeader,
#[error("Invalid total difficulty")]
Expand Down
4 changes: 2 additions & 2 deletions src/headers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ pub fn check_valid_header(block: &Block, header_dir: &str) -> Result<(), BlockHe
let block_header_roots: BlockHeaderRoots = block_header.clone().try_into()?; // TODO: Errors

if header_roots != block_header_roots {
return Err(BlockHeaderError::MismatchedRoots(
return Err(BlockHeaderError::MismatchedRoots(Box::new((
header_roots,
block_header_roots,
));
))));
}

Ok(())
Expand Down

0 comments on commit 6a4c39d

Please sign in to comment.