aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2022-09-01 18:44:07 +1000
committerAnthony Towns <aj@erisian.com.au>2022-09-01 20:53:57 +1000
commitd394156b99d6b9a99aedee78658310d169ca188d (patch)
treefb8a475398d43d7153754decf4895aaf79aa634d /src/net.cpp
parent9dccc3328eeaf9cd66518d812c878def5d014e36 (diff)
net: make CNode::m_permissionFlags const
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp
index cbc2b35013..c6448e4798 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1027,9 +1027,11 @@ void CConnman::CreateNodeFromAcceptedSocket(std::unique_ptr<Sock>&& sock,
addr_bind,
/*addrNameIn=*/"",
ConnectionType::INBOUND,
- inbound_onion);
+ inbound_onion,
+ CNodeOptions{
+ .permission_flags = permissionFlags,
+ });
pnode->AddRef();
- pnode->m_permissionFlags = permissionFlags;
pnode->m_prefer_evict = discouraged;
m_msgproc->InitializeNode(*pnode, nodeServices);
@@ -2725,6 +2727,7 @@ CNode::CNode(NodeId idIn,
CNodeOptions&& node_opts)
: m_deserializer{std::make_unique<V1TransportDeserializer>(V1TransportDeserializer(Params(), idIn, SER_NETWORK, INIT_PROTO_VERSION))},
m_serializer{std::make_unique<V1TransportSerializer>(V1TransportSerializer())},
+ m_permissionFlags{node_opts.permission_flags},
m_sock{sock},
m_connected{GetTime<std::chrono::seconds>()},
addr{addrIn},