mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
test: Use int.to_bytes over struct packing
This is done in prepration for the scripted diff, which can not deal with those lines.
This commit is contained in:
@@ -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)',
|
||||
|
||||
Reference in New Issue
Block a user