diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2024-02-07 11:20:41 +0100 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2024-05-07 15:40:41 +0200 |
commit | faf2a975ad46799d075e3a70c699da0d8182aab9 (patch) | |
tree | 7ea931de4cf54d382ef47272338320ea0469047d /test/functional/p2p_invalid_messages.py | |
parent | faf3cd659a72473a1aa73c4367a145f4ec64f146 (diff) |
test: Use int.to_bytes over struct packing
This is done in prepration for the scripted diff, which can not deal
with those lines.
Diffstat (limited to 'test/functional/p2p_invalid_messages.py')
-rwxr-xr-x | test/functional/p2p_invalid_messages.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/functional/p2p_invalid_messages.py b/test/functional/p2p_invalid_messages.py index 40a69936bc..adcbb4fd05 100755 --- a/test/functional/p2p_invalid_messages.py +++ b/test/functional/p2p_invalid_messages.py @@ -5,7 +5,6 @@ """Test node responses to invalid network messages.""" import random -import struct import time from test_framework.messages import ( @@ -233,7 +232,7 @@ class InvalidMessagesTest(BitcoinTestFramework): '208d')) # port def test_addrv2_unrecognized_network(self): - now_hex = struct.pack('<I', int(time.time())).hex() + now_hex = int(time.time()).to_bytes(4, "little").hex() self.test_addrv2('unrecognized network', [ 'received: addrv2 (25 bytes)', |