mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
merge bitcoin#27529: fix feature_addrman.py
on big-endian systems
This commit is contained in:
parent
7d149c97be
commit
c798b496cd
@ -31,12 +31,12 @@ def serialize_addrman(
|
|||||||
r += struct.pack("B", format)
|
r += struct.pack("B", format)
|
||||||
r += struct.pack("B", INCOMPATIBILITY_BASE + lowest_compatible)
|
r += struct.pack("B", INCOMPATIBILITY_BASE + lowest_compatible)
|
||||||
r += ser_uint256(bucket_key)
|
r += ser_uint256(bucket_key)
|
||||||
r += struct.pack("i", len_new or len(new))
|
r += struct.pack("<i", len_new or len(new))
|
||||||
r += struct.pack("i", len_tried or len(tried))
|
r += struct.pack("<i", len_tried or len(tried))
|
||||||
ADDRMAN_NEW_BUCKET_COUNT = 1 << 10
|
ADDRMAN_NEW_BUCKET_COUNT = 1 << 10
|
||||||
r += struct.pack("i", ADDRMAN_NEW_BUCKET_COUNT ^ (1 << 30))
|
r += struct.pack("<i", ADDRMAN_NEW_BUCKET_COUNT ^ (1 << 30))
|
||||||
for _ in range(ADDRMAN_NEW_BUCKET_COUNT):
|
for _ in range(ADDRMAN_NEW_BUCKET_COUNT):
|
||||||
r += struct.pack("i", 0)
|
r += struct.pack("<i", 0)
|
||||||
checksum = hash256(r)
|
checksum = hash256(r)
|
||||||
r += mock_checksum or checksum
|
r += mock_checksum or checksum
|
||||||
return r
|
return r
|
||||||
|
Loading…
Reference in New Issue
Block a user