mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-06-11 03:42:31 +02:00
test: Same addr, diff port is already connected
This commit is contained in:
parent
94e85a82a7
commit
f1b142856a
@ -155,6 +155,13 @@ BOOST_FIXTURE_TEST_CASE(test_addnode_getaddednodeinfo_and_connection_detection,
|
||||
BOOST_CHECK(connman->AlreadyConnectedPublic(node->addr));
|
||||
}
|
||||
|
||||
BOOST_TEST_MESSAGE("\nCheck that peers with the same addresses as connected peers but different ports are detected as connected.");
|
||||
for (auto node : connman->TestNodes()) {
|
||||
uint16_t changed_port = node->addr.GetPort() + 1;
|
||||
CService address_with_changed_port{node->addr, changed_port};
|
||||
BOOST_CHECK(connman->AlreadyConnectedPublic(CAddress{address_with_changed_port, NODE_NONE}));
|
||||
}
|
||||
|
||||
// Clean up
|
||||
for (auto node : connman->TestNodes()) {
|
||||
peerman->FinalizeNode(*node);
|
||||
|
Loading…
Reference in New Issue
Block a user