File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
test/functional/test_framework Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ def connection_made(self, transport):
223
223
# send the initial handshake immediately
224
224
if self .supports_v2_p2p and self .v2_state .initiating and not self .v2_state .tried_v2_handshake :
225
225
send_handshake_bytes = self .v2_state .initiate_v2_handshake ()
226
+ logger .debug (f"sending { len (self .v2_state .sent_garbage )} bytes of garbage data" )
226
227
self .send_raw_message (send_handshake_bytes )
227
228
# for v1 outbound connections, send version message immediately after opening
228
229
# (for v2 outbound connections, send it after the initial v2 handshake)
@@ -262,6 +263,7 @@ def _on_data_v2_handshake(self):
262
263
self .v2_state = None
263
264
return
264
265
elif send_handshake_bytes :
266
+ logger .debug (f"sending { len (self .v2_state .sent_garbage )} bytes of garbage data" )
265
267
self .send_raw_message (send_handshake_bytes )
266
268
elif send_handshake_bytes == b"" :
267
269
return # only after send_handshake_bytes are sent can `complete_handshake()` be done
Original file line number Diff line number Diff line change 4
4
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
5
"""Class for v2 P2P protocol (see BIP 324)"""
6
6
7
- import logging
8
7
import random
9
8
10
9
from .crypto .bip324_cipher import FSChaCha20Poly1305
14
13
from .key import TaggedHash
15
14
from .messages import MAGIC_BYTES
16
15
17
- logger = logging .getLogger ("TestFramework.v2_p2p" )
18
16
19
17
CHACHA20POLY1305_EXPANSION = 16
20
18
HEADER_LEN = 1
@@ -116,7 +114,6 @@ def generate_keypair_and_garbage(self):
116
114
self .privkey_ours , self .ellswift_ours = ellswift_create ()
117
115
garbage_len = random .randrange (MAX_GARBAGE_LEN + 1 )
118
116
self .sent_garbage = random .randbytes (garbage_len )
119
- logger .debug (f"sending { garbage_len } bytes of garbage data" )
120
117
return self .ellswift_ours + self .sent_garbage
121
118
122
119
def initiate_v2_handshake (self ):
You can’t perform that action at this time.
0 commit comments