“bitcoind addnode IP remove” should disconnect immediately from the given node. #2729

issue randy-waterhouse openend this issue on June 3, 2013
  1. randy-waterhouse commented at 11:42 am on June 3, 2013: contributor

    There doesn’t appear to be any mechanism to disconnect from nodes without stopping and starting bitcoind.

    The “addnode” RPC call has a remove function but this appears to just remove the node from the list of addnodes, without disconnecting from the ‘misbehaving’ node immediately.

    It is also a matter of network optimisation as marginal connections with distant nodes can lead to an increase in traffic due to resends, repeated requests, etc. If poor connections can be easily dropped, the good connections can come into majority. Some simple decision code to drop misbehaving nodes (high latency) can be added to a call to disconnect to achieve better network wide connectivity.

  2. wtogami commented at 11:45 am on June 3, 2013: contributor
    “addnode IP add” seems to connect to that IP immediately? “addnode IP remove” should disconnect from that IP immediately for consistency. The reason to want to disconnect is not important.
  3. subSTRATA commented at 1:49 pm on June 7, 2013: none
    “addnode IP remove” with 0.8.2 QT returns “Error: Node has not been added. (code -24)” unless node was added using “addnode IP add” command previously and that is true even for nodes that were connected the usual way prior to using “addnode IP remove”. In other words, if node X is already connected, one still must use “addnode X add” and then “addnode X remove” to remove node X (it is not actualy removed, as posted earlier by randy-waterhouse and wtogami).
  4. Alex-van-der-Peet commented at 7:04 am on June 9, 2015: contributor

    There is a pending pull request that allows you to disconnect from peers through the UI: #6217

    As a side note, I find it strange that a command called ‘addnode’ has a parameter ‘remove’.

    All the same, I implemented it and made a pull request: #6259

  5. laanwj commented at 1:10 pm on January 29, 2016: member
    Closing since a command disconnectnode exists now
  6. laanwj closed this on Jan 29, 2016

  7. Bushstar referenced this in commit 5c84cab0f1 on Apr 5, 2019
  8. MarcoFalke locked this on Sep 8, 2021

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: 2024-11-16 21:12 UTC

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