0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00

[test] Move test framework crypto functions to crypto/

This commit is contained in:
stratospher 2023-09-09 14:31:53 +05:30
parent 8371914604
commit 08a4a56cbc
14 changed files with 10 additions and 10 deletions

View file

@ -105,7 +105,7 @@ from test_framework.key import (
tweak_add_privkey, tweak_add_privkey,
ECKey, ECKey,
) )
from test_framework import secp256k1 from test_framework.crypto import secp256k1
from test_framework.address import ( from test_framework.address import (
hash160, hash160,
program_to_witness, program_to_witness,

View file

@ -11,7 +11,7 @@ from test_framework.messages import (
COutPoint, COutPoint,
from_hex, from_hex,
) )
from test_framework.muhash import MuHash3072 from test_framework.crypto.muhash import MuHash3072
from test_framework.test_framework import BitcoinTestFramework from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal from test_framework.util import assert_equal
from test_framework.wallet import MiniWallet from test_framework.wallet import MiniWallet

View file

@ -4,7 +4,7 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Helper routines relevant for compact block filters (BIP158). """Helper routines relevant for compact block filters (BIP158).
""" """
from .siphash import siphash from .crypto.siphash import siphash
def bip158_basic_element_hash(script_pub_key, N, block_hash): def bip158_basic_element_hash(script_pub_key, N, block_hash):

View file

@ -12,7 +12,7 @@ import os
import random import random
import unittest import unittest
from test_framework.secp256k1 import FE, G, GE from test_framework.crypto.secp256k1 import FE, G, GE
# Precomputed constant square root of -3 (mod p). # Precomputed constant square root of -3 (mod p).
MINUS_3_SQRT = FE(-3).sqrt() MINUS_3_SQRT = FE(-3).sqrt()

View file

@ -13,7 +13,7 @@ import os
import random import random
import unittest import unittest
from test_framework import secp256k1 from test_framework.crypto import secp256k1
# Point with no known discrete log. # Point with no known discrete log.
H_POINT = "50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0" H_POINT = "50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0"

View file

@ -29,7 +29,7 @@ import struct
import time import time
import unittest import unittest
from test_framework.siphash import siphash256 from test_framework.crypto.siphash import siphash256
from test_framework.util import assert_equal from test_framework.util import assert_equal
MAX_LOCATOR_SZ = 101 MAX_LOCATOR_SZ = 101

View file

@ -24,7 +24,7 @@ from .messages import (
uint256_from_str, uint256_from_str,
) )
from .ripemd160 import ripemd160 from .crypto.ripemd160 import ripemd160
MAX_SCRIPT_ELEMENT_SIZE = 520 MAX_SCRIPT_ELEMENT_SIZE = 520
MAX_PUBKEYS_PER_MULTI_A = 999 MAX_PUBKEYS_PER_MULTI_A = 999

View file

@ -74,11 +74,11 @@ TEST_EXIT_SKIPPED = 77
TEST_FRAMEWORK_MODULES = [ TEST_FRAMEWORK_MODULES = [
"address", "address",
"blocktools", "blocktools",
"ellswift", "crypto.ellswift",
"key", "key",
"messages", "messages",
"muhash", "crypto.muhash",
"ripemd160", "crypto.ripemd160",
"script", "script",
"segwit_addr", "segwit_addr",
] ]