aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2022-01-28 06:31:41 +0100
committerVasil Dimov <vd@FreeBSD.org>2022-01-28 06:41:11 +0100
commitef5014d256638735b292672c774446db4003f03b (patch)
treeb4efaddc4340abd49f3b61c4b2fbced235a8c6d8
parentb68349164827f14c472201cad54c4e19a3321261 (diff)
style: wrap long lines in CNode creation and add some comments
-rw-r--r--src/net.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp
index eeaceebf1a..159451e230 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -505,7 +505,16 @@ CNode* CConnman::ConnectNode(CAddress addrConnect, const char *pszDest, bool fCo
if (!addr_bind.IsValid()) {
addr_bind = GetBindAddress(sock->Get());
}
- CNode* pnode = new CNode(id, nLocalServices, std::move(sock), addrConnect, CalculateKeyedNetGroup(addrConnect), nonce, addr_bind, pszDest ? pszDest : "", conn_type, /* inbound_onion */ false);
+ CNode* pnode = new CNode(id,
+ nLocalServices,
+ std::move(sock),
+ addrConnect,
+ CalculateKeyedNetGroup(addrConnect),
+ nonce,
+ addr_bind,
+ pszDest ? pszDest : "",
+ conn_type,
+ /*inbound_onion=*/false);
pnode->AddRef();
// 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,
}
const bool inbound_onion = std::find(m_onion_binds.begin(), m_onion_binds.end(), addr_bind) != m_onion_binds.end();
- CNode* pnode = new CNode(id, nodeServices, std::move(sock), addr, CalculateKeyedNetGroup(addr), nonce, addr_bind, "", ConnectionType::INBOUND, inbound_onion);
+ CNode* pnode = new CNode(id,
+ nodeServices,
+ std::move(sock),
+ addr,
+ CalculateKeyedNetGroup(addr),
+ nonce,
+ addr_bind,
+ /*addrNameIn=*/"",
+ ConnectionType::INBOUND,
+ inbound_onion);
pnode->AddRef();
pnode->m_permissionFlags = permissionFlags;
pnode->m_prefer_evict = discouraged;