Skip to content

Commit

Permalink
Swap out hashlib.ripemd160 for own implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
sipa committed Dec 8, 2021
1 parent ad3e9e1 commit 5b559dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/functional/test_framework/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"""

from collections import namedtuple
import hashlib
import struct
import unittest
from typing import List, Dict
Expand All @@ -25,14 +24,16 @@
uint256_from_str,
)

from .ripemd160 import ripemd160

MAX_SCRIPT_ELEMENT_SIZE = 520
LOCKTIME_THRESHOLD = 500000000
ANNEX_TAG = 0x50

LEAF_VERSION_TAPSCRIPT = 0xc0

def hash160(s):
return hashlib.new('ripemd160', sha256(s)).digest()
return ripemd160(sha256(s))

def bn2vch(v):
"""Convert number to bitcoin-specific little endian format."""
Expand Down

0 comments on commit 5b559dc

Please sign in to comment.