Issue Details

Number
28635
Title
Test calling addnode more than once (and MAX_ADDNODE_CONNECTIONS)
Description
While reviewing #28331 we noticed a crash that wasn't caught by the test suite, but would very quickly happen on a real node. See https://github.com/bitcoin/bitcoin/pull/28331#discussion_r1342450439 I was able to reproduce it by calling `addnode` twice and having the test suite wait a little bit. But this also involved hacking `ThreadOpenAddedConnections` to wait 1 second instead of a full minute. See https://github.com/Sjors/bitcoin/commit/bc3995c66300fb3139c5360e8f6ee807b02ea86e If the test suite could mock the delay in `ThreadOpenAddedConnections` we can add a regular test for this. It would also be a good idea to test `MAX_ADDNODE_CONNECTIONS`, which should be a simple matter of spinning up ~10 test nodes.
URL
https://github.com/bitcoin/bitcoin/issue/28635
Closed by
Back to List