docker: Manually install protobuf to avoid error.
Error: "TypeError: Descriptors cannot not be created directly" Use pycryptodome ripemd160 implementation else it must be manually enabled in hashlib/openssl.
This commit is contained in:
11 files changed
+102
-896
No files matched your search
@@ -10,6 +10,7 @@ import hashlib
|
||||
import struct
|
||||
import unittest
|
||||
from typing import List, Dict
|
||||
from basicswap.util.crypto import ripemd160
|
||||
|
||||
from .messages import (
|
||||
CTransaction,
|
||||
@@ -25,7 +26,7 @@ MAX_SCRIPT_ELEMENT_SIZE = 520
|
||||
OPCODE_NAMES = {} # type: Dict[CScriptOp, str]
|
||||
|
||||
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."""
|
||||
|
||||
Reference in new issue
Block a user