Open cwsatpolymath opened 3 years ago
By "disconnect", are you talking about the TCP connection? If yes, then it's working as intended. The reserved nodes feature only covers which connections are used for syncing. In other words, the number of peers shown in the informant should decrease by one. Then, after 10 seconds of inactivity, the TCP connection will actually close.
By "disconnect", are you talking about the TCP connection? If yes, then it's working as intended.
By "disconnect" I mean stop syncing with this peer.
In other words, the number of peers shown in the informant should decrease by one.
This is not happening in my test case. The number of peers stays the same.
Then, after 10 seconds of inactivity, the TCP connection will actually close.
Perhaps I'm hitting an edge case - I'm starting the node with zero peers, then adding one reserved peer, then removing it. Is the connection to this peer not closing because there are no other peers to fall back to?
Problem description
Consider a scenario where a node is launched with the
--reserved-only
flag and no--reserved-peers
option. This node will not connect to any peers. Then use thesystem_addReservedPeer
to add a reserved node, e.g./dns4/some.reserved.node/tcp/30333/p2p/123456789abcdefgh
. The local node will then connect to said other node and start syncing. So far so good.If we then use the
system_removeReservedPeer
RPC method to remove peer123456789abcdefgh
the response isindicating success. However the node will stay connected to that peer. One would expect that removing a reserved node with the RPC call should disconnect the node from said peer (at least when using
--reserved-only
).Resolution:
I'd like to see one of the following two implemented:
system_removeReservedPeer
RPC method to disconnect the node from the reserved peer (if connected)system_removeReservedPeer
is working as intended then provide an RPC method to disconnect the node either from a specific peer or from all current peers.