From f70a4061ed3c2c8e7d1d2dc24b1ac81c552b0bd9 Mon Sep 17 00:00:00 2001 From: aruokhai Date: Thu, 3 Aug 2023 08:59:20 +0100 Subject: [PATCH] chaged the usage of depreciated RIPEMD160 Hashlib to pycrytodom RIPEMD160 implementation --- test_framework/script.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test_framework/script.py b/test_framework/script.py index 87572658d..2fe43607f 100644 --- a/test_framework/script.py +++ b/test_framework/script.py @@ -15,7 +15,7 @@ import itertools import queue import struct - +from Crypto.Hash import RIPEMD160 from .bignum import bn2vch MAX_SCRIPT_ELEMENT_SIZE = 520 @@ -30,9 +30,9 @@ TAPROOT_VER = 0 def hash160(s): - return hashlib.new('ripemd160', sha256(s)).digest() - - + h = RIPEMD160.new() + h.update(sha256(s)) + return h.digest() _opcode_instances = [] class CScriptOp(int): """A single script opcode"""