File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1414import logging
1515log = logging .getLogger (__name__ )
1616
17+
1718class Introducer :
1819 def __init__ (self ):
1920 config_filename = os .path .join (ROOT_DIR , "config" , "config.yaml" )
@@ -31,9 +32,9 @@ async def request_peers(
3132 rawpeers = self .server .global_connections .peers .get_peers (
3233 max_peers * 2 , True , self .config ["recent_peer_threshold" ]
3334 )
34-
35+
3536 peers = []
36-
37+
3738 for peer in rawpeers :
3839 if peer .get_hash () not in self .vetted :
3940 try :
@@ -55,11 +56,11 @@ async def request_peers(
5556
5657 log .info (f"Have vetted { peer } successfully!" )
5758 self .vetted [peer .get_hash ()] = True
58-
59+
5960 if self .vetted [peer .get_hash ()]:
6061 peers .append (peer )
61-
62- if len (peers )>= max_peers :
62+
63+ if len (peers ) >= max_peers :
6364 break
6465
6566 log .info (f"Sending vetted { peers } " )
You can’t perform that action at this time.
0 commit comments