Changeset View
Changeset View
Standalone View
Standalone View
src/test/net_tests.cpp
Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Lines | BOOST_AUTO_TEST_CASE(cnode_simple_test) { | ||||
SOCKET hSocket = INVALID_SOCKET; | SOCKET hSocket = INVALID_SOCKET; | ||||
NodeId id = 0; | NodeId id = 0; | ||||
int height = 0; | int height = 0; | ||||
in_addr ipv4Addr; | in_addr ipv4Addr; | ||||
ipv4Addr.s_addr = 0xa0b0c001; | ipv4Addr.s_addr = 0xa0b0c001; | ||||
CAddress addr = CAddress(CService(ipv4Addr, 7777), NODE_NETWORK); | CAddress addr = CAddress(CService(ipv4Addr, 7777), NODE_NETWORK); | ||||
std::string pszDest = ""; | std::string pszDest; | ||||
bool fInboundIn = false; | bool fInboundIn = false; | ||||
// Test that fFeeler is false by default. | // Test that fFeeler is false by default. | ||||
std::unique_ptr<CNode> pnode1(new CNode(id++, NODE_NETWORK, height, hSocket, | std::unique_ptr<CNode> pnode1(new CNode(id++, NODE_NETWORK, height, hSocket, | ||||
addr, 0, 0, CAddress(), pszDest, | addr, 0, 0, CAddress(), pszDest, | ||||
fInboundIn)); | fInboundIn)); | ||||
BOOST_CHECK(pnode1->fInbound == false); | BOOST_CHECK(pnode1->fInbound == false); | ||||
BOOST_CHECK(pnode1->fFeeler == false); | BOOST_CHECK(pnode1->fFeeler == false); | ||||
Show All 36 Lines |