Skip to content

Commit f894632

Browse files
committed
Fix another usage of openssl's ripemd160
1 parent 3f7c031 commit f894632

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bitcoin/core/scripteval.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import bitcoin.core._bignum
2424
import bitcoin.core.key
2525
import bitcoin.core.serialize
26+
from bitcoin.core.contrib.ripemd160 import ripemd160
2627

2728
# Importing everything for simplicity; note that we use __all__ at the end so
2829
# we're not exporting the whole contents of the script module.
@@ -624,9 +625,7 @@ def check_args(n):
624625
elif sop == OP_RIPEMD160:
625626
check_args(1)
626627

627-
h = hashlib.new('ripemd160')
628-
h.update(stack.pop())
629-
stack.append(h.digest())
628+
stack.append(ripemd160(stack.pop()))
630629

631630
elif sop == OP_ROT:
632631
check_args(3)

0 commit comments

Comments
 (0)