Skip to content

Commit 198208a

Browse files
committed
validate and filter bootstrap addresses during discovery initialization
1 parent a26fd95 commit 198208a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libp2p/discovery/bootstrap/bootstrap.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from multiaddr import Multiaddr
44

55
from libp2p.abc import INetworkService
6+
from libp2p.discovery.bootstrap.utils import validate_bootstrap_addresses
67
from libp2p.discovery.events.peerDiscovery import peerDiscovery
78
from libp2p.peer.peerinfo import info_from_p2p_addr
89

@@ -28,6 +29,9 @@ def start(self) -> None:
2829
f"{len(self.bootstrap_addrs)} bootstrap addresses"
2930
)
3031

32+
# Validate and filter bootstrap addresses
33+
self.bootstrap_addrs = validate_bootstrap_addresses(self.bootstrap_addrs)
34+
3135
for addr_str in self.bootstrap_addrs:
3236
try:
3337
self._process_bootstrap_addr(addr_str)

0 commit comments

Comments
 (0)