aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2021-07-07 00:57:50 +0000
committerbrunoerg <brunoely.gc@gmail.com>2024-02-28 10:05:56 -0300
commit8e06be347c5e14cbe75256eba170e0867f95f360 (patch)
tree891441e9e16499d93c7ac1aacaa59377a2fc88b2 /src/net.cpp
parent9133fd69a5cc9a0ab1a06a60d09f1b7e1039018e (diff)
downloadbitcoin-8e06be347c5e14cbe75256eba170e0867f95f360.tar.xz
net_processing: Move extra service flag into InitializeNode
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 1241c76e63..64f4620eff 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1790,15 +1790,10 @@ void CConnman::CreateNodeFromAcceptedSocket(std::unique_ptr<Sock>&& sock,
NodeId id = GetNewNodeId();
uint64_t nonce = GetDeterministicRandomizer(RANDOMIZER_ID_LOCALHOSTNONCE).Write(id).Finalize();
- ServiceFlags nodeServices = nLocalServices;
- if (NetPermissions::HasFlag(permission_flags, NetPermissionFlags::BloomFilter)) {
- nodeServices = static_cast<ServiceFlags>(nodeServices | NODE_BLOOM);
- }
-
const bool inbound_onion = std::find(m_onion_binds.begin(), m_onion_binds.end(), addr_bind) != m_onion_binds.end();
// The V2Transport transparently falls back to V1 behavior when an incoming V1 connection is
// detected, so use it whenever we signal NODE_P2P_V2.
- const bool use_v2transport(nodeServices & NODE_P2P_V2);
+ const bool use_v2transport(nLocalServices & NODE_P2P_V2);
CNode* pnode = new CNode(id,
std::move(sock),
@@ -1816,7 +1811,7 @@ void CConnman::CreateNodeFromAcceptedSocket(std::unique_ptr<Sock>&& sock,
.use_v2transport = use_v2transport,
});
pnode->AddRef();
- m_msgproc->InitializeNode(*pnode, nodeServices);
+ m_msgproc->InitializeNode(*pnode, nLocalServices);
LogPrint(BCLog::NET, "connection from %s accepted\n", addr.ToStringAddrPort());