From 568a1d72619371a45b14a8356d3f80bd0c0efabc Mon Sep 17 00:00:00 2001 From: Stepan Snigirev Date: Thu, 5 Nov 2020 23:16:55 +0100 Subject: [PATCH] fix ecdsa verify in test framework --- test/functional/test_framework/key.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/test_framework/key.py b/test/functional/test_framework/key.py index a6bc1879855..abf25071542 100644 --- a/test/functional/test_framework/key.py +++ b/test/functional/test_framework/key.py @@ -322,7 +322,7 @@ def verify_ecdsa(self, sig, msg, low_s=True): u1 = z*w % SECP256K1_ORDER u2 = r*w % SECP256K1_ORDER R = SECP256K1.affine(SECP256K1.mul([(SECP256K1_G, u1), (self.p, u2)])) - if R is None or R[0] != r: + if R is None or (R[0] % SECP256K1_ORDER) != r: return False return True