Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
zjb0807 committed Jul 23, 2024
1 parent 6a1ff54 commit ed52f59
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions runtime/common/src/check_nonce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,13 @@ where

if cfg!(feature = "tracing") {
// skip check when enable tracing feature
} else {
if self.nonce != evm_nonce {
return Err(if self.nonce < evm_nonce {
InvalidTransaction::Stale
} else {
InvalidTransaction::Future
}
.into());
} else if self.nonce != evm_nonce {
return Err(if self.nonce < evm_nonce {
InvalidTransaction::Stale
} else {
InvalidTransaction::Future
}
.into());
}
} else if self.nonce != account.nonce {
return Err(if self.nonce < account.nonce {
Expand Down Expand Up @@ -163,10 +161,8 @@ where

if cfg!(feature = "tracing") {
// skip check when enable tracing feature
} else {
if self.nonce < evm_nonce {
return InvalidTransaction::Stale.into();
}
} else if self.nonce < evm_nonce {
return InvalidTransaction::Stale.into();
}

let provides = vec![Encode::encode(&(address, self.nonce))];
Expand Down

0 comments on commit ed52f59

Please sign in to comment.