bip360: much cleaner, more readable s2w function

This commit is contained in:
notmike committed 2026-06-26 20:03:12 -06:00
1 parent 9bf46b5cfe
commit ac2aa2ff7d
1 file changed
+1 -1
+1 -1
View File
@@ -48,7 +48,7 @@ def h2b(h: str) -> bytes:
def s2w(script: str) -> List[int]:
"""Convert a script/witprog hex string to a List[int] of its bytes"""
return [int(f"{script[i:i + 2]}", 16) for i in range(0, len(script), 2)]
return list(h2b(script))
def get_compact_size(n: int) -> bytes: