Skip to content

Commit

Permalink
Use != instead of !.eq
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez committed Apr 22, 2022
1 parent e8125fc commit 336215d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions bee-ledger/src/workers/consensus/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,21 +106,15 @@ where

white_flag(tangle, storage, message.parents(), &mut metadata).await?;

if !metadata
.confirmed_merkle_proof
.eq(&milestone.essence().confirmed_merkle_proof())
{
if metadata.confirmed_merkle_proof != milestone.essence().confirmed_merkle_proof() {
return Err(Error::ConfirmedMerkleProofMismatch(
milestone.essence().index(),
prefix_hex::encode(metadata.confirmed_merkle_proof),
prefix_hex::encode(milestone.essence().confirmed_merkle_proof()),
));
}

if !metadata
.applied_merkle_proof
.eq(&milestone.essence().applied_merkle_proof())
{
if metadata.applied_merkle_proof != milestone.essence().applied_merkle_proof() {
return Err(Error::AppliedMerkleProofMismatch(
milestone.essence().index(),
prefix_hex::encode(metadata.applied_merkle_proof),
Expand Down

0 comments on commit 336215d

Please sign in to comment.