-
Notifications
You must be signed in to change notification settings - Fork 38.7k
init: Remove dead code in LoadChainTip #15999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
This is essentially just reverting b0f3249 PR doesn't seem to address why this prior change was inapplicable. |
|
See the immediate follow-up commit 13ab353 that disabled the code. So the code was never executed and tested as part of a release. (And if it ever were executed it would immediately crash with an assert failure anyway.) If you want to enable that code, it needs to be properly reviewed and tested. |
|
Concept ACK |
|
utACK fa86c8a. |
|
utACK fa86c8a |
ryanofsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
utACK fa86c8a |
|
utACK fa86c8a |
fa86c8a init: Remove dead code in LoadChainTip (MarcoFalke) Pull request description: `LoadChainTip` sets `::ChainActive()` based on `pcoinsTip`'s best block. `LoadChainTip` is never called when that block is null, so we can remove all code from within that method that is only executed when that block is null. Fixes #15967 Inconsistent locking behavior in LoadChainTip ACKs for commit fa86c8: promag: utACK fa86c8a. practicalswift: utACK fa86c8a Empact: utACK fa86c8a laanwj: utACK fa86c8a ryanofsky: utACK fa86c8a. LoadChainTip isn't called currently when pcoinsTip best block is null due to this line: jamesob: utACK fa86c8a Tree-SHA512: 8961c0e579800a52038ac5655478468852faac055299b64d6cfdf0c213d3bf09669c4889467d09d93457f6c8b073967bb0475a137f77ddd3a3a3c03ad90001c4
Summary:
fa86c8aec6 init: Remove dead code in LoadChainTip (MarcoFalke)
Pull request description:
`LoadChainTip` sets `::ChainActive()` based on `pcoinsTip`'s best block. `LoadChainTip` is never called when that block is null, so we can remove all code from within that method that is only executed when that block is null.
Fixes #15967 Inconsistent locking behavior in LoadChainTip
ACKs for commit fa86c8:
promag:
utACK fa86c8aec611a9b9d2f53960c92419cf2a8bb92d.
practicalswift:
utACK fa86c8aec611a9b9d2f53960c92419cf2a8bb92d
Empact:
utACK bitcoin/bitcoin@fa86c8a
laanwj:
utACK fa86c8aec611a9b9d2f53960c92419cf2a8bb92d
ryanofsky:
utACK fa86c8aec611a9b9d2f53960c92419cf2a8bb92d. LoadChainTip isn't called currently when pcoinsTip best block is null due to this line:
jamesob:
utACK bitcoin/bitcoin@fa86c8a
Tree-SHA512: 8961c0e579800a52038ac5655478468852faac055299b64d6cfdf0c213d3bf09669c4889467d09d93457f6c8b073967bb0475a137f77ddd3a3a3c03ad90001c4
Backport of Core [[bitcoin/bitcoin#15999 | PR15999]]
Our only call for `LoadChainTip()` is [[ https://reviews.bitcoinabc.org/source/bitcoin-abc/browse/master/src/init.cpp$2526-2528 | here ]] and requires `pcoinsTip` to not be null.
Test Plan:
ninja
ninja check-all
Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien, deadalnix
Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien, deadalnix
Subscribers: Fabien, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D6631
Summary:
fa86c8aec6 init: Remove dead code in LoadChainTip (MarcoFalke)
Pull request description:
`LoadChainTip` sets `::ChainActive()` based on `pcoinsTip`'s best block. `LoadChainTip` is never called when that block is null, so we can remove all code from within that method that is only executed when that block is null.
Fixes #15967 Inconsistent locking behavior in LoadChainTip
ACKs for commit fa86c8:
promag:
utACK fa86c8aec611a9b9d2f53960c92419cf2a8bb92d.
practicalswift:
utACK fa86c8aec611a9b9d2f53960c92419cf2a8bb92d
Empact:
utACK bitcoin/bitcoin@fa86c8a
laanwj:
utACK fa86c8aec611a9b9d2f53960c92419cf2a8bb92d
ryanofsky:
utACK fa86c8aec611a9b9d2f53960c92419cf2a8bb92d. LoadChainTip isn't called currently when pcoinsTip best block is null due to this line:
jamesob:
utACK bitcoin/bitcoin@fa86c8a
Tree-SHA512: 8961c0e579800a52038ac5655478468852faac055299b64d6cfdf0c213d3bf09669c4889467d09d93457f6c8b073967bb0475a137f77ddd3a3a3c03ad90001c4
Backport of Core [[bitcoin/bitcoin#15999 | PR15999]]
Our only call for `LoadChainTip()` is [[ https://reviews.bitcoinabc.org/source/bitcoin-abc/browse/master/src/init.cpp$2526-2528 | here ]] and requires `pcoinsTip` to not be null.
Test Plan:
ninja
ninja check-all
Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien, deadalnix
Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien, deadalnix
Subscribers: Fabien, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D6631
LoadChainTipsets::ChainActive()based onpcoinsTip's best block.LoadChainTipis never called when that block is null, so we can remove all code from within that method that is only executed when that block is null.Fixes #15967 Inconsistent locking behavior in LoadChainTip