File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1030,9 +1030,9 @@ void CConnman::CreateNodeFromAcceptedSocket(std::unique_ptr<Sock>&& sock,
1030
1030
inbound_onion,
1031
1031
CNodeOptions{
1032
1032
.permission_flags = permissionFlags,
1033
+ .prefer_evict = discouraged,
1033
1034
});
1034
1035
pnode->AddRef ();
1035
- pnode->m_prefer_evict = discouraged;
1036
1036
m_msgproc->InitializeNode (*pnode, nodeServices);
1037
1037
1038
1038
LogPrint (BCLog::NET, " connection from %s accepted\n " , addr.ToString ());
@@ -2734,6 +2734,7 @@ CNode::CNode(NodeId idIn,
2734
2734
addrBind{addrBindIn},
2735
2735
m_addr_name{addrNameIn.empty () ? addr.ToStringIPPort () : addrNameIn},
2736
2736
m_inbound_onion{inbound_onion},
2737
+ m_prefer_evict{node_opts.prefer_evict },
2737
2738
nKeyedNetGroup{nKeyedNetGroupIn},
2738
2739
id{idIn},
2739
2740
nLocalHostNonce{nLocalHostNonceIn},
Original file line number Diff line number Diff line change @@ -338,6 +338,7 @@ struct CNodeOptions
338
338
{
339
339
NetPermissionFlags permission_flags = NetPermissionFlags::None;
340
340
std::unique_ptr<i2p::sam::Session> i2p_sam_session = nullptr ;
341
+ bool prefer_evict = false ;
341
342
};
342
343
343
344
/* * Information about a peer */
@@ -399,7 +400,7 @@ class CNode
399
400
* from the wire. This cleaned string can safely be logged or displayed.
400
401
*/
401
402
std::string cleanSubVer GUARDED_BY (m_subver_mutex){};
402
- bool m_prefer_evict{false }; // This peer is preferred for eviction. (treated as const)
403
+ const bool m_prefer_evict{false }; // This peer is preferred for eviction.
403
404
bool HasPermission (NetPermissionFlags permission) const {
404
405
return NetPermissions::HasFlag (m_permissionFlags, permission);
405
406
}
You can’t perform that action at this time.
0 commit comments