We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad3e9e1 commit 5b559dcCopy full SHA for 5b559dc
test/functional/test_framework/script.py
@@ -8,7 +8,6 @@
8
"""
9
10
from collections import namedtuple
11
-import hashlib
12
import struct
13
import unittest
14
from typing import List, Dict
@@ -25,14 +24,16 @@
25
24
uint256_from_str,
26
)
27
+from .ripemd160 import ripemd160
28
+
29
MAX_SCRIPT_ELEMENT_SIZE = 520
30
LOCKTIME_THRESHOLD = 500000000
31
ANNEX_TAG = 0x50
32
33
LEAF_VERSION_TAPSCRIPT = 0xc0
34
35
def hash160(s):
- return hashlib.new('ripemd160', sha256(s)).digest()
36
+ return ripemd160(sha256(s))
37
38
def bn2vch(v):
39
"""Convert number to bitcoin-specific little endian format."""
0 commit comments