This commit is contained in:
mainnet-pat
2024-10-30 06:07:29 +00:00
committed by tecnovert
parent a7c2fbba1f
commit 465f910812
7 changed files with 25 additions and 82 deletions

View File

@@ -32,6 +32,7 @@ def decodeScriptNum(script_bytes, o):
v += int(b) << 8 * i
return (v, 1 + num_len)
def decodePushData(script_bytes, o):
datasize = None
pushdata_type = None
@@ -76,6 +77,7 @@ def decodePushData(script_bytes, o):
# return data and the number of bytes to skip forward
return (data, i + datasize - o)
def getP2SHScriptForHash(p2sh):
return bytes((OpCodes.OP_HASH160, 0x14)) \
+ p2sh \