aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2024-02-07 11:30:21 +0100
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2024-05-07 15:40:40 +0200
commitfaf3cd659a72473a1aa73c4367a145f4ec64f146 (patch)
tree05952c0fdf7246fa13ee2eaeba559a75ef290b65 /test/functional/test_framework
parentef09f535b7b540d997f8c2bfa67b3386711bc8b4 (diff)
downloadbitcoin-faf3cd659a72473a1aa73c4367a145f4ec64f146.tar.xz
test: Normalize struct.pack format
* Add () around some int values * Remove b-prefix from strings This is needed for the scripted diff to work.
Diffstat (limited to 'test/functional/test_framework')
-rw-r--r--test/functional/test_framework/script.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/test_framework/script.py b/test/functional/test_framework/script.py
index 7b19d31e17..ee3c3a0efd 100644
--- a/test/functional/test_framework/script.py
+++ b/test/functional/test_framework/script.py
@@ -58,9 +58,9 @@ class CScriptOp(int):
elif len(d) <= 0xff:
return b'\x4c' + bytes([len(d)]) + d # OP_PUSHDATA1
elif len(d) <= 0xffff:
- return b'\x4d' + struct.pack(b'<H', len(d)) + d # OP_PUSHDATA2
+ return b'\x4d' + struct.pack('<H', len(d)) + d # OP_PUSHDATA2
elif len(d) <= 0xffffffff:
- return b'\x4e' + struct.pack(b'<I', len(d)) + d # OP_PUSHDATA4
+ return b'\x4e' + struct.pack('<I', len(d)) + d # OP_PUSHDATA4
else:
raise ValueError("Data too long to encode in a PUSHDATA op")
@@ -670,7 +670,7 @@ def LegacySignatureMsg(script, txTo, inIdx, hashtype):
txtmp.vin.append(tmp)
s = txtmp.serialize_without_witness()
- s += struct.pack(b"<I", hashtype)
+ s += struct.pack("<I", hashtype)
return (s, None)