Skip to content

Should a node be able to dial itself? #189

Closed
@mkg20001

Description

@mkg20001
  • Version: *
  • Platform: *
  • Subsystem: transport, dialer

Type: question

Severity: low

Description: Should a node be able to dial itself?

Steps to reproduce the error:

  1. Create a node and start it
  2. node.dial(node.peerInfo, () => {}

Currently a node is able to dial itself.
Problem:

  • What if there are 2 nodes with the same peer-id because someone messed something up... should it only allow dials from and to itself or from any node that has it's id
  • It might be useful for debugging but I don't see any real-world use case where this makes sense (maybe hide it behind a flag like allowDialToSelf)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium: Good to have, but can wait until someone steps upkind/bugA bug in existing code (including security flaws)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions