stacks-core
stacks-core copied to clipboard
Fix/4732
This fixes #4732 by tracking pending connections in addition to completed connections, so that the state machine for StackerDB doesn't re-attempt a handshake if it already has one in-flight. It also disables disconnection from dead/broken StackerDB peers, since a StackerDB peer's inability to reply to a StackerDB request (itself a best-effort replication system) should not be grounds for disconnecting from and banning the node in its entirety.
Okay, I have this running on my node, and have tested it in both IBD and steady-state modes of operation. No duplicate connections have been established.
ping @kantai
(note that this is blocking the next point release)
@kantai I added some regression tests for the new functionality
There are some build issues with the latest version.