[net/refactor] Remove fInbound flag from CNode

This commit is contained in:
Amiti Uttarwar
2020-07-28 13:39:38 -07:00
parent 7b322df629
commit 60156f5fc4
4 changed files with 29 additions and 27 deletions

View File

@@ -182,10 +182,10 @@ BOOST_AUTO_TEST_CASE(cnode_simple_test)
std::string pszDest;
std::unique_ptr<CNode> pnode1 = MakeUnique<CNode>(id++, NODE_NETWORK, height, hSocket, addr, 0, 0, CAddress(), pszDest, ConnectionType::OUTBOUND);
BOOST_CHECK(pnode1->fInbound == false);
BOOST_CHECK(pnode1->IsInboundConn() == false);
std::unique_ptr<CNode> pnode2 = MakeUnique<CNode>(id++, NODE_NETWORK, height, hSocket, addr, 1, 1, CAddress(), pszDest, ConnectionType::INBOUND);
BOOST_CHECK(pnode2->fInbound == true);
BOOST_CHECK(pnode2->IsInboundConn() == true);
}
// prior to PR #14728, this test triggers an undefined behavior