Skip to content

Commit ef5014d

Browse files
committed
style: wrap long lines in CNode creation and add some comments
1 parent b683491 commit ef5014d

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

src/net.cpp

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,16 @@ CNode* CConnman::ConnectNode(CAddress addrConnect, const char *pszDest, bool fCo
505505
if (!addr_bind.IsValid()) {
506506
addr_bind = GetBindAddress(sock->Get());
507507
}
508-
CNode* pnode = new CNode(id, nLocalServices, std::move(sock), addrConnect, CalculateKeyedNetGroup(addrConnect), nonce, addr_bind, pszDest ? pszDest : "", conn_type, /* inbound_onion */ false);
508+
CNode* pnode = new CNode(id,
509+
nLocalServices,
510+
std::move(sock),
511+
addrConnect,
512+
CalculateKeyedNetGroup(addrConnect),
513+
nonce,
514+
addr_bind,
515+
pszDest ? pszDest : "",
516+
conn_type,
517+
/*inbound_onion=*/false);
509518
pnode->AddRef();
510519

511520
// We're making a new connection, harvest entropy from the time (and our peer count)
@@ -1197,7 +1206,16 @@ void CConnman::CreateNodeFromAcceptedSocket(std::unique_ptr<Sock>&& sock,
11971206
}
11981207

11991208
const bool inbound_onion = std::find(m_onion_binds.begin(), m_onion_binds.end(), addr_bind) != m_onion_binds.end();
1200-
CNode* pnode = new CNode(id, nodeServices, std::move(sock), addr, CalculateKeyedNetGroup(addr), nonce, addr_bind, "", ConnectionType::INBOUND, inbound_onion);
1209+
CNode* pnode = new CNode(id,
1210+
nodeServices,
1211+
std::move(sock),
1212+
addr,
1213+
CalculateKeyedNetGroup(addr),
1214+
nonce,
1215+
addr_bind,
1216+
/*addrNameIn=*/"",
1217+
ConnectionType::INBOUND,
1218+
inbound_onion);
12011219
pnode->AddRef();
12021220
pnode->m_permissionFlags = permissionFlags;
12031221
pnode->m_prefer_evict = discouraged;

0 commit comments

Comments
 (0)