Conversation
|
/run-security-scan |
alexcos20
left a comment
There was a problem hiding this comment.
AI automated code review (Gemini 3).
Overall risk: low
Summary:
This PR enhances the P2P address announcement logic within OceanP2P by explicitly handling DNS-based multiaddrs (dns, dns4, dns6, dnsaddr). It ensures that such addresses are announced if they do not resolve to a loopback address (localhost or 127.0.0.1). This change correctly prioritizes and allows public DNS P2P addresses, aligning with the feature of announcing DNS-p2p addresses.
Comments:
• [INFO][style] The addressString = maddr.nodeAddress().address line is duplicated and calculated in both the new DNS block and the subsequent generic IP block. While this is a minor detail and doesn't affect correctness, you could consider extracting this calculation to a single variable at the beginning of the shouldAnnounce method to slightly improve readability and avoid potential redundant calls to maddr.nodeAddress().
Fixes # .
Changes proposed in this PR: