diff options
author | Jon Atack <jon@atack.com> | 2023-11-14 18:12:45 -0600 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2024-05-23 09:44:19 +0100 |
commit | 31adcfa171c834a63237b4885ae19674fdff16f9 (patch) | |
tree | bfa5b8c17fe4ee63c8e97c1e973affe706aa5c6f /src | |
parent | 9cdb9edfb8d1a4b0c1ba39cea0d5cee2e28e1d31 (diff) |
test: add GetAddedNodeInfo() CJDNS regression unit test
Github-Pull: #30085
Rebased-From: d0b047494c28381942c09d0cca45baa323bfcffc
Diffstat (limited to 'src')
-rw-r--r-- | src/test/net_peer_connection_tests.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/net_peer_connection_tests.cpp b/src/test/net_peer_connection_tests.cpp index 58cbe9eb72..00bc1fdb6a 100644 --- a/src/test/net_peer_connection_tests.cpp +++ b/src/test/net_peer_connection_tests.cpp @@ -108,6 +108,12 @@ BOOST_AUTO_TEST_CASE(test_addnode_getaddednodeinfo_and_connection_detection) AddPeer(id, nodes, *peerman, *connman, ConnectionType::BLOCK_RELAY, /*onion_peer=*/true); AddPeer(id, nodes, *peerman, *connman, ConnectionType::INBOUND); + // Add a CJDNS peer connection. + AddPeer(id, nodes, *peerman, *connman, ConnectionType::INBOUND, /*onion_peer=*/false, + /*address=*/"[fc00:3344:5566:7788:9900:aabb:ccdd:eeff]:1234"); + BOOST_CHECK(nodes.back()->IsInboundConn()); + BOOST_CHECK_EQUAL(nodes.back()->ConnectedThroughNetwork(), Network::NET_CJDNS); + BOOST_TEST_MESSAGE("Call AddNode() for all the peers"); for (auto node : connman->TestNodes()) { BOOST_CHECK(connman->AddNode({/*m_added_node=*/node->addr.ToStringAddrPort(), /*m_use_v2transport=*/true})); |