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 ea53c46 commit cf9902fCopy full SHA for cf9902f
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
@@ -29,14 +28,16 @@
29
28
uint256_from_str,
30
)
31
+from .ripemd160 import ripemd160
32
+
33
MAX_SCRIPT_ELEMENT_SIZE = 520
34
LOCKTIME_THRESHOLD = 500000000
35
ANNEX_TAG = 0x50
36
37
LEAF_VERSION_TAPSCRIPT = 0xc4
38
39
def hash160(s):
- return hashlib.new('ripemd160', sha256(s)).digest()
40
+ return ripemd160(sha256(s))
41
42
def bn2vch(v):
43
"""Convert number to bitcoin-specific little endian format."""
0 commit comments