Skip to content

Commit ffd9bd8

Browse files
committed
removed unreachable safety checks for code clarity
1 parent 4e05d10 commit ffd9bd8

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/Secp256k1Lib.sol

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ library Secp256k1 {
7272
if (x1 == x2) {
7373
if (y1 == y2) return doublePointUnchecked(x1, y1); // Doubling a point
7474
if ((y1 + y2) % p == 0) return (0, 0); // Point at infinity
75-
// ! This checks are unreachable if the points are valid. Added here just as a safety measure, as they don't use gas, since they should never be reached.
76-
if (!isOnCurve(x1, y1)) revert Secp256k1__InvalidPoint(x1, y1);
77-
if (!isOnCurve(x2, y2)) revert Secp256k1__InvalidPoint(x2, y2);
7875
}
7976

8077
// ! Calculate slope

0 commit comments

Comments
 (0)