Skip to content

Commit c15c7bb

Browse files
kwvgPastaPastaPasta
authored andcommitted
partial bitcoin#20161: Minor taproot follow-ups
includes: - 1d22300
1 parent 9aeef44 commit c15c7bb

File tree

1 file changed

+3
-3
lines changed
  • test/functional/test_framework

1 file changed

+3
-3
lines changed

test/functional/test_framework/key.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ def set(self, data):
235235
x = int.from_bytes(data[1:33], 'big')
236236
if SECP256K1.is_x_coord(x):
237237
p = SECP256K1.lift_x(x)
238-
# if the oddness of the y co-ord isn't correct, find the other
239-
# valid y
238+
# Make the Y coordinate odd if required (lift_x always produces
239+
# a point with an even Y coordinate).
240240
if data[0] & 1:
241241
p = SECP256K1.negate(p)
242242
self.p = p
@@ -551,7 +551,7 @@ def test_schnorr_testvectors(self):
551551
sig_actual = sign_schnorr(seckey, msg, aux_rand)
552552
self.assertEqual(sig.hex(), sig_actual.hex(), "BIP340 test vector %i (%s): sig mismatch" % (i, comment))
553553
except RuntimeError as e:
554-
self.assertFalse("BIP340 test vector %i (%s): signing raised exception %s" % (i, comment, e))
554+
self.fail("BIP340 test vector %i (%s): signing raised exception %s" % (i, comment, e))
555555
result_actual = verify_schnorr(pubkey, sig, msg)
556556
if result:
557557
self.assertEqual(result, result_actual, "BIP340 test vector %i (%s): verification failed" % (i, comment))

0 commit comments

Comments
 (0)