diff options
author | Anthony Towns <aj@erisian.com.au> | 2022-09-01 18:44:07 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2022-09-01 20:53:57 +1000 |
commit | d394156b99d6b9a99aedee78658310d169ca188d (patch) | |
tree | fb8a475398d43d7153754decf4895aaf79aa634d /src/net.cpp | |
parent | 9dccc3328eeaf9cd66518d812c878def5d014e36 (diff) |
net: make CNode::m_permissionFlags const
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 7 |
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}, |