Skip to content

Commit

Permalink
fix: use >= instead of > for private key check (#3127)
Browse files Browse the repository at this point in the history
  • Loading branch information
mds1 committed Sep 8, 2022
1 parent 6abb763 commit 5548e15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion evm/src/executor/inspector/cheatcodes/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ fn broadcast_key(
return Err("Private key cannot be 0.".to_string().encode().into())
}

if private_key > U256::from_big_endian(&Secp256k1::ORDER.to_be_bytes()) {
if private_key >= U256::from_big_endian(&Secp256k1::ORDER.to_be_bytes()) {
return Err("Private key must be less than 115792089237316195423570985008687907852837564279074904382605163141518161494337 (the secp256k1 curve order).".to_string().encode().into());
}

Expand Down

0 comments on commit 5548e15

Please sign in to comment.