aboutsummaryrefslogtreecommitdiff
path: root/src/test/net_tests.cpp
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2020-10-21 11:53:38 +0200
committerJon Atack <jon@atack.com>2020-12-17 19:56:12 +0100
commit86c495223f048e5ca2cf0d8730af7db3b76f7aba (patch)
treeb70377a1fe0754b0536735984ac7ebb1e3214ce1 /src/test/net_tests.cpp
parent6609eb8cb50fe92c7317b5db9e72d4333b3aab1b (diff)
net: add CNode::IsInboundOnion() public getter and unit tests
Diffstat (limited to 'src/test/net_tests.cpp')
-rw-r--r--src/test/net_tests.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/net_tests.cpp b/src/test/net_tests.cpp
index eb2f4cee69..f6adc6a28d 100644
--- a/src/test/net_tests.cpp
+++ b/src/test/net_tests.cpp
@@ -200,6 +200,7 @@ BOOST_AUTO_TEST_CASE(cnode_simple_test)
BOOST_CHECK(pnode1->IsFeelerConn() == false);
BOOST_CHECK(pnode1->IsAddrFetchConn() == false);
BOOST_CHECK(pnode1->IsInboundConn() == false);
+ BOOST_CHECK(pnode1->IsInboundOnion() == false);
BOOST_CHECK_EQUAL(pnode1->ConnectedThroughNetwork(), Network::NET_IPV4);
std::unique_ptr<CNode> pnode2 = MakeUnique<CNode>(
@@ -214,6 +215,7 @@ BOOST_AUTO_TEST_CASE(cnode_simple_test)
BOOST_CHECK(pnode2->IsFeelerConn() == false);
BOOST_CHECK(pnode2->IsAddrFetchConn() == false);
BOOST_CHECK(pnode2->IsInboundConn() == true);
+ BOOST_CHECK(pnode2->IsInboundOnion() == false);
BOOST_CHECK_EQUAL(pnode2->ConnectedThroughNetwork(), Network::NET_IPV4);
std::unique_ptr<CNode> pnode3 = MakeUnique<CNode>(
@@ -228,6 +230,7 @@ BOOST_AUTO_TEST_CASE(cnode_simple_test)
BOOST_CHECK(pnode3->IsFeelerConn() == false);
BOOST_CHECK(pnode3->IsAddrFetchConn() == false);
BOOST_CHECK(pnode3->IsInboundConn() == false);
+ BOOST_CHECK(pnode3->IsInboundOnion() == false);
BOOST_CHECK_EQUAL(pnode3->ConnectedThroughNetwork(), Network::NET_IPV4);
std::unique_ptr<CNode> pnode4 = MakeUnique<CNode>(
@@ -242,6 +245,7 @@ BOOST_AUTO_TEST_CASE(cnode_simple_test)
BOOST_CHECK(pnode4->IsFeelerConn() == false);
BOOST_CHECK(pnode4->IsAddrFetchConn() == false);
BOOST_CHECK(pnode4->IsInboundConn() == true);
+ BOOST_CHECK(pnode4->IsInboundOnion() == true);
BOOST_CHECK_EQUAL(pnode4->ConnectedThroughNetwork(), Network::NET_ONION);
}