mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
partial bitcoin#20292: Fix intermittent feature_taproot issue
includes: - 50eb0c2512842b96a0128a7d592a357665f6e006 (only changes to test/ functional/test_framework/key.py)
This commit is contained in:
parent
94bd52d5e0
commit
663b3c7450
@ -11,7 +11,6 @@ import hashlib
|
||||
import hmac
|
||||
import os
|
||||
import random
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
def TaggedHash(tag, data):
|
||||
@ -21,6 +20,7 @@ def TaggedHash(tag, data):
|
||||
return hashlib.sha256(ss).digest()
|
||||
|
||||
def xor_bytes(b0, b1):
|
||||
assert len(b0) == len(b1)
|
||||
return bytes(x ^ y for (x, y) in zip(b0, b1))
|
||||
|
||||
def jacobi_symbol(n, k):
|
||||
@ -535,7 +535,8 @@ class TestFrameworkKey(unittest.TestCase):
|
||||
def test_schnorr_testvectors(self):
|
||||
"""Implement the BIP340 test vectors (read from bip340_test_vectors.csv)."""
|
||||
num_tests = 0
|
||||
with open(os.path.join(sys.path[0], 'test_framework', 'bip340_test_vectors.csv'), newline='', encoding='utf8') as csvfile:
|
||||
vectors_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'bip340_test_vectors.csv')
|
||||
with open(vectors_file, newline='', encoding='utf8') as csvfile:
|
||||
reader = csv.reader(csvfile)
|
||||
next(reader)
|
||||
for row in reader:
|
||||
|
Loading…
Reference in New Issue
Block a user