Prevent double connections #823

pull sipa wants to merge 1 commits into bitcoin:master from sipa:nodupcon changing 2 files +18 −0
  1. sipa commented at 11:39 AM on February 11, 2012: member

    In preparation of IPv6 support: prevent double connections to the same node.

    Not urgent.

  2. Prevent duplicate connections 9067988054
  3. jgarzik commented at 9:40 PM on February 11, 2012: contributor

    ACK

  4. luke-jr commented at 2:53 PM on February 17, 2012: member

    Does this break connecting to multiple nodes on different ports? eg, multiple local bitcoinds

  5. sipa commented at 3:16 PM on February 17, 2012: member

    All nodes have a self-generated unique 64-bit identifier. This patch will prevent two connections to a partner with the same identifier.

    Running two nodes on one system and connecting to both should not be a problem.

  6. luke-jr commented at 7:31 PM on February 20, 2012: member

    Per https://en.bitcoin.it/wiki/Protocol_specification#version the nonce is unique for every version message, so this would imply a protocol change making it static per client...

  7. sipa commented at 12:43 AM on February 21, 2012: member

    Nice catch; that makes this problem somewhat harder to solve. Closing for now...

  8. sipa closed this on Feb 21, 2012

  9. destenson referenced this in commit 6323c91cb0 on Jun 26, 2016
  10. ptschip referenced this in commit 287cf8911d on Nov 4, 2017
  11. DrahtBot locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-19 09:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me