Page MenuHomePhabricator

net: Add CNodeOptions and increase constness
ClosedPublic

Authored by PiRK on Tue, Nov 12, 13:16.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC0211596ef3bb: net: Add CNodeOptions and increase constness
Summary

net: make CNode::m_permissionFlags const

net: make CNode::m_prefer_evict const

This is a partial backport of core#25962
https://github.com/bitcoin/bitcoin/pull/25962/commits/9dccc3328eeaf9cd66518d812c878def5d014e36 (partial, for struct CNodeOptions and the CNode ctor signature)
https://github.com/bitcoin/bitcoin/pull/25962/commits/d394156b99d6b9a99aedee78658310d169ca188d
https://github.com/bitcoin/bitcoin/pull/25962/commits/0a7fc428978c4db416fdcf9bf0b79de17d0558d7

The first commit of the PR (i2p_sam_session) is not applicable due to missing backports.

Depends on D17109

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Tue, Nov 12, 13:16
src/net.cpp
3464

The order in which members are initialized is different from the source material for now because of missing backports (m_permissionFlasgs is declared later because it is still private in our codebase).

Fabien requested changes to this revision.Tue, Nov 12, 14:02
Fabien added a subscriber: Fabien.

The commits are not the correct ones

This revision now requires changes to proceed.Tue, Nov 12, 14:02

The commits are not the correct ones

I think they are correct. The issue is that there is also some changes from the first commit that need to be included (declaration of the CNodeOptions struct) so I will add this as well in the summary.

PiRK requested review of this revision.Tue, Nov 12, 14:52
PiRK edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Tue, Nov 12, 15:38
This revision was automatically updated to reflect the committed changes.