From f894632c29b12d24d93789c0a24cb64bb2580394 Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Fri, 26 Aug 2022 16:26:26 -0300 Subject: [PATCH] Fix another usage of openssl's ripemd160 --- bitcoin/core/scripteval.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bitcoin/core/scripteval.py b/bitcoin/core/scripteval.py index 4064a9fc..e93e8720 100644 --- a/bitcoin/core/scripteval.py +++ b/bitcoin/core/scripteval.py @@ -23,6 +23,7 @@ import bitcoin.core._bignum import bitcoin.core.key import bitcoin.core.serialize +from bitcoin.core.contrib.ripemd160 import ripemd160 # Importing everything for simplicity; note that we use __all__ at the end so # we're not exporting the whole contents of the script module. @@ -624,9 +625,7 @@ def check_args(n): elif sop == OP_RIPEMD160: check_args(1) - h = hashlib.new('ripemd160') - h.update(stack.pop()) - stack.append(h.digest()) + stack.append(ripemd160(stack.pop())) elif sop == OP_ROT: check_args(3)