init: avoid unsetting service bits from nLocalServices#25887
Merged
maflcko merged 1 commit intobitcoin:masterfrom Sep 1, 2022
Merged
Conversation
maflcko
reviewed
Aug 20, 2022
03f2333 to
a681bb3
Compare
stickies-v
reviewed
Aug 20, 2022
Contributor
stickies-v
left a comment
There was a problem hiding this comment.
Approach ACK a681bb33d8645acf9e7d4f007c4835f9a39aaae0
init.cpp::nLocalServices doesn't get exposed until at the end of AppInitMain() where the flag is now set, so I don't see how this can lead to any behaviour change (except for the different logging)
maflcko
reviewed
Aug 20, 2022
nLocalServicesnLocalServices
Rather than setting the service bit `NODE_NETWORK` first and then unset it, start out the bare minimum flags that every node serves and only add `NODE_NETWORK` if we are running as a non-pruned node.
a681bb3 to
1b5bec7
Compare
Contributor
|
ACK 1b5bec7 |
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Sep 1, 2022
…ervices` 1b5bec7 init: avoid unsetting service bits from `nLocalServices` (Sebastian Falbesoner) Pull request description: This PR is a late follow-up to the [review club session about the PR "Default to NODE_WITNESS in nLocalServices" ](https://bitcoincore.reviews/21090#l-90) (bitcoin#21090): ``` 17:32 <lightlike> hmm, if we are in pruned mode, we first set NODE_NETWORK and then unset it later in init.cpp. that seems a bit strange. ... 17:33 <jnewbery> lightlike: ah yes, you're right. That does seem a bit messy. ``` Rather than setting the service bit `NODE_NETWORK` first and then unset it (if in `fPruneMode`), start with the bare minimum flags that we always serve and only add `NODE_NETWORK` if we are running as a non-pruned node. This seems to be a more logical approach than currently on master. ACKs for top commit: naumenkogs: ACK 1b5bec7 stickies-v: ACK 1b5bec7 LarryRuane: ACK 1b5bec7 Tree-SHA512: 2e82d66c4298ffacff41d9e0458b74b83bc156a1fa49e3f3471e942878e5dd2b253b5597ee5ec1d9c8726b432751d05e40f0c580f3976a9e00a7d1f417921ab0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a late follow-up to the review club session about the PR "Default to NODE_WITNESS in nLocalServices" (#21090):
Rather than setting the service bit
NODE_NETWORKfirst and then unset it (if infPruneMode), start with the bare minimum flags that we always serve and only addNODE_NETWORKif we are running as a non-pruned node. This seems to be a more logical approach than currently on master.