aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2020-10-15 15:39:09 -0700
committerPieter Wuille <pieter@wuille.net>2020-10-15 15:39:09 -0700
commit1d22300b99cda0504bb1f457d94468fa2c33c4e2 (patch)
tree43fa205e7e5d6c77788b783db083da05f2d72c89 /test
parent5669642a0bbac60b746e9301de2cefd6358ca0c0 (diff)
downloadbitcoin-1d22300b99cda0504bb1f457d94468fa2c33c4e2.tar.xz
Address functional test nits
Diffstat (limited to 'test')
-rw-r--r--test/functional/test_framework/key.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/test_framework/key.py b/test/functional/test_framework/key.py
index 17b869e542..a6bc187985 100644
--- a/test/functional/test_framework/key.py
+++ b/test/functional/test_framework/key.py
@@ -240,8 +240,8 @@ class ECPubKey():
x = int.from_bytes(data[1:33], 'big')
if SECP256K1.is_x_coord(x):
p = SECP256K1.lift_x(x)
- # if the oddness of the y co-ord isn't correct, find the other
- # valid y
+ # Make the Y coordinate odd if required (lift_x always produces
+ # a point with an even Y coordinate).
if data[0] & 1:
p = SECP256K1.negate(p)
self.p = p
@@ -542,7 +542,7 @@ class TestFrameworkKey(unittest.TestCase):
sig_actual = sign_schnorr(seckey, msg, aux_rand)
self.assertEqual(sig.hex(), sig_actual.hex(), "BIP340 test vector %i (%s): sig mismatch" % (i, comment))
except RuntimeError as e:
- self.assertFalse("BIP340 test vector %i (%s): signing raised exception %s" % (i, comment, e))
+ self.fail("BIP340 test vector %i (%s): signing raised exception %s" % (i, comment, e))
result_actual = verify_schnorr(pubkey, sig, msg)
if result:
self.assertEqual(result, result_actual, "BIP340 test vector %i (%s): verification failed" % (i, comment))