Skip to content

Commit

Permalink
fix one more
Browse files Browse the repository at this point in the history
  • Loading branch information
jiajames committed Dec 6, 2023
1 parent 28f7b01 commit 215df78
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/starkex/test_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
'58c7d5a90b1776bde86ebac077e053ed85b0f7164f53b080304a531947f46e3'
)
MOCK_SIGNATURE = (
'07670488d9d2c6ff980ca86e6d05b89414de0f2bfd462a1058fb05add68d034a' +
'036268ae33e8e21d324e975678f56b66dacb2502a7de1512a46b96fc0e106f79'
'0500a22a8c8b14fbb3b7d26366604c446b9d059420d7db2a8f94bc52691d2626' +
'003e38aa083f72c9db89a7a80b98a6eb92edce7294d917d8489767740affc6ed'
)

# Test data where the public key y-coordinate is even.
MOCK_PUBLIC_KEY_EVEN_Y = (
'5c749cd4c44bdc730bc90af9bfbdede9deb2c1c96c05806ce1bc1cb4fed64f7'
)
MOCK_SIGNATURE_EVEN_Y = (
'0500a22a8c8b14fbb3b7d26366604c446b9d059420d7db2a8f94bc52691d2626' +
'5c749cd4c44bdc730bc90af9bfbdede9deb2c1c96c05806ce1bc1cb4fed64f7' +
'003e38aa083f72c9db89a7a80b98a6eb92edce7294d917d8489767740affc6ed'
)

Expand Down Expand Up @@ -57,6 +57,8 @@ def test_verify_signature_odd_y(self):

def test_verify_signature_even_y(self):
order = SignableOrder(**ORDER_PARAMS)
signature = order.sign(MOCK_SIGNATURE_EVEN_Y)
assert signature == MOCK_SIGNATURE_EVEN_Y
assert order.verify_signature(
MOCK_SIGNATURE_EVEN_Y,
MOCK_PUBLIC_KEY_EVEN_Y,
Expand Down

0 comments on commit 215df78

Please sign in to comment.