Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed error when adding peers to the routing table #1334

Merged
merged 4 commits into from
Feb 21, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fixed error when adding peers to the routing table
egbertbouman committed Feb 21, 2025
commit cd72dcad790dba8ce5f46c9b7250bf4a09495c43
4 changes: 4 additions & 0 deletions ipv8/dht/community.py
Original file line number Diff line number Diff line change
@@ -373,6 +373,10 @@ def on_node_discovered(self, public_key_bin: bytes, source_address: Address) ->
if isinstance(source_address, UDPv6Address) and UDPv6Address not in self.my_peer.addresses:
return

# We need to know our own node ID before we can start adding nodes to the routing table
if self.my_estimated_wan in [("::1", 0), ("0.0.0.0", 0)]:
return

# Filter out trackers
if source_address not in self.network.blacklist:
node = Node(public_key_bin, source_address)