Decred: Add proxy config when using tor.

This commit is contained in:
tecnovert
2024-05-25 11:22:12 +02:00
parent 73b4b2a46b
commit 62aa1fa5d7
5 changed files with 31 additions and 9 deletions

View File

@@ -11,11 +11,11 @@ def decode_compactsize(b: bytes, offset: int = 0) -> (int, int):
return i, 1
offset += 1
if i == 0xfd:
return int.from_bytes(b[offset: offset + 2]), 3
return int.from_bytes(b[offset: offset + 2], 'little'), 3
if i == 0xfe:
return int.from_bytes(b[offset: offset + 4]), 5
return int.from_bytes(b[offset: offset + 4], 'little'), 5
# 0xff
return int.from_bytes(b[offset: offset + 8]), 9
return int.from_bytes(b[offset: offset + 8], 'little'), 9
def encode_compactsize(i: int) -> bytes: