Skip to content

Commit

Permalink
update based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
antiochp committed May 28, 2020
1 parent 399a313 commit bec9c40
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions chain/src/pipe.rs
Expand Up @@ -49,13 +49,11 @@ pub struct BlockContext<'a> {
// If it matches current chain head (latest or previous hash) then we know about it.
// If it exists in the local db then we know about it.
fn check_known(header: &BlockHeader, head: &Tip, ctx: &BlockContext<'_>) -> Result<(), Error> {
if header.total_difficulty() > head.total_difficulty {
Ok(())
} else {
if header.total_difficulty() <= head.total_difficulty {
check_known_head(header, head)?;
check_known_store(header, head, ctx)?;
Ok(())
}
Ok(())
}

// Validate only the proof of work in a block header.
Expand Down

0 comments on commit bec9c40

Please sign in to comment.