File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -145,13 +145,13 @@ def run_test(self):
145
145
def test_magic_bytes (self ):
146
146
conn = self .nodes [0 ].add_p2p_connection (P2PDataStore ())
147
147
148
- def swap_magic_bytes ():
148
+ async def swap_magic_bytes ():
149
149
conn ._on_data = lambda : None # Need to ignore all incoming messages from now, since they come with "invalid" magic bytes
150
150
conn .magic_bytes = b'\x00 \x11 \x22 \x32 '
151
151
152
152
# Call .result() to block until the atomic swap is complete, otherwise
153
153
# we might run into races later on
154
- asyncio .run_coroutine_threadsafe (asyncio . coroutine ( swap_magic_bytes ) (), NetworkThread .network_event_loop ).result ()
154
+ asyncio .run_coroutine_threadsafe (swap_magic_bytes (), NetworkThread .network_event_loop ).result ()
155
155
156
156
with self .nodes [0 ].assert_debug_log (['PROCESSMESSAGE: INVALID MESSAGESTART ping' ]):
157
157
conn .send_message (messages .msg_ping (nonce = 0xff ))
You can’t perform that action at this time.
0 commit comments