I'm playing around with connecting my node to another one of my nodes to see how many incoming connections I can handle. Whenever I add node A from node B with bitcoin-cli addnode add after the first time, I get:

error code: -23 error message: Error: Node already added

Is there a way around this? Can I edit the source code somehow to allow multiple connections between the same nodes? Presumably I would only have to edit the code for the sending node, not the receiving node, since I think the receiving node has to be able to accept connections from what appear to be the same IP and port because of NATS? The alternative is to run many instances of bitcoind in pruned mode which would work I guess, but it's not ideal obviously

  • I'm curious, why do you want to do this?
    – chytrik
    Commented Dec 4, 2018 at 22:24
  • To see how many incoming connections my nodes can handle. :)
    – user46871
    Commented Dec 4, 2018 at 22:28
  • Max number of incoming connections is part of config.
    – James C.
    Commented Dec 4, 2018 at 22:38
  • @JamesC. I know but I want to allow one node (A) to establish many outgoing connections to the same node (B)
    – user46871
    Commented Dec 4, 2018 at 22:40
  • Ok, it is not allowed as you already mentioned. The same p2p communication will be repeated, so multiple channels are redundant. If a node propagates a new tx or header, it will announce it to all channels. But if you still want to do it, I think the peer is id’ed by IP in version msg, so you would have to tweak the sourcecode to broadcast a different address for each channel, or accept identical IP on multiple inbound connections.
    – James C.
    Commented Dec 4, 2018 at 22:48


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.