Skip to content

Commit

Permalink
Merge #282: Fix another usage of openssl's ripemd160
Browse files Browse the repository at this point in the history
f894632 Fix another usage of openssl's ripemd160 (Pablo Greco)

Pull request description:

Top commit has no ACKs.

Tree-SHA512: f1609522105b5727a59961b788eeddb9b1d69bb6f23f0c1dfabf764f4b41bf4c98d7e4f0f605374fefe11137ed1432ce077d2b07bdded9a82f7431290832dea2
  • Loading branch information
petertodd committed Aug 28, 2022
2 parents 3f7c031 + f894632 commit 03ae667
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bitcoin/core/scripteval.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 03ae667

Please sign in to comment.