Skip to content

Commit

Permalink
perf: remove redondant checks on sig
Browse files Browse the repository at this point in the history
  • Loading branch information
MathisGD committed Jul 28, 2023
1 parent 391ab28 commit 970846d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/Blue.sol
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,6 @@ contract Blue is IFlashLender {
uint256 deadline,
Signature calldata signature
) external {
require(uint256(signature.s) <= MAX_VALID_ECDSA_S, Errors.INVALID_S);
// v ∈ {27, 28} (source: https://ethereum.github.io/yellowpaper/paper.pdf #308)
require(signature.v == 27 || signature.v == 28, Errors.INVALID_V);
require(block.timestamp < deadline, Errors.SIGNATURE_EXPIRED);

bytes32 hashStruct = keccak256(
Expand Down

0 comments on commit 970846d

Please sign in to comment.