aboutsummaryrefslogtreecommitdiff
path: root/src/test/net_tests.cpp
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2021-02-12 21:40:19 +0100
committerJon Atack <jon@atack.com>2021-02-12 22:32:08 +0100
commit2ee4a7a9ec68c75094685c06ec793b614f44c4ce (patch)
treea5b238b2843ab4eff9765b275e82481fff4133dd /src/test/net_tests.cpp
parent24bda56c29800502953c6a8cd69248e60ff9a0a0 (diff)
downloadbitcoin-2ee4a7a9ec68c75094685c06ec793b614f44c4ce.tar.xz
net: remove CNode::m_inbound_onion defaults for explicitness
and to allow the compiler to warn if uninitialized in the ctor or omitted in the caller.
Diffstat (limited to 'src/test/net_tests.cpp')
-rw-r--r--src/test/net_tests.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/net_tests.cpp b/src/test/net_tests.cpp
index 60e22f732f..010a3375cf 100644
--- a/src/test/net_tests.cpp
+++ b/src/test/net_tests.cpp
@@ -192,7 +192,8 @@ BOOST_AUTO_TEST_CASE(cnode_simple_test)
id++, NODE_NETWORK, hSocket, addr,
/* nKeyedNetGroupIn = */ 0,
/* nLocalHostNonceIn = */ 0,
- CAddress(), pszDest, ConnectionType::OUTBOUND_FULL_RELAY);
+ CAddress(), pszDest, ConnectionType::OUTBOUND_FULL_RELAY,
+ /* inbound_onion = */ false);
BOOST_CHECK(pnode1->IsFullOutboundConn() == true);
BOOST_CHECK(pnode1->IsManualConn() == false);
BOOST_CHECK(pnode1->IsBlockOnlyConn() == false);
@@ -679,7 +680,7 @@ BOOST_AUTO_TEST_CASE(ipv4_peer_with_ipv6_addrMe_test)
in_addr ipv4AddrPeer;
ipv4AddrPeer.s_addr = 0xa0b0c001;
CAddress addr = CAddress(CService(ipv4AddrPeer, 7777), NODE_NETWORK);
- std::unique_ptr<CNode> pnode = MakeUnique<CNode>(0, NODE_NETWORK, INVALID_SOCKET, addr, 0, 0, CAddress{}, std::string{}, ConnectionType::OUTBOUND_FULL_RELAY);
+ std::unique_ptr<CNode> pnode = MakeUnique<CNode>(0, NODE_NETWORK, INVALID_SOCKET, addr, /* nKeyedNetGroupIn */ 0, /* nLocalHostNonceIn */ 0, CAddress{}, /* pszDest */ std::string{}, ConnectionType::OUTBOUND_FULL_RELAY, /* inbound_onion */ false);
pnode->fSuccessfullyConnected.store(true);
// the peer claims to be reaching us via IPv6