Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mrLSD committed Jan 16, 2025
1 parent 6e7ea18 commit 638fb47
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions engine-transactions/src/eip_7702.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,8 @@ impl SignedTransaction7702 {
// Step 3. Checking: authority = ecrecover(keccak(MAGIC || rlp([chain_id, address, nonce])), y_parity, r, s])
// Validate the signature, as in tests it is possible to have invalid signatures values.
// Value `v` shouldn't be greater then 1
let mut is_valid = auth.chain_id.is_zero()
|| auth.chain_id == current_tx_chain_id
|| auth.parity <= U256::from(1);
let mut is_valid = (auth.chain_id.is_zero() || auth.chain_id == current_tx_chain_id)
&& auth.parity <= U256::from(1);

let v = u8::try_from(auth.parity.as_u64()).map_err(|_| Error::InvalidV)?;
// EIP-2 validation
Expand Down

0 comments on commit 638fb47

Please sign in to comment.