miner: Remove uncompiled MTP code#23637
Merged
fanquake merged 2 commits intobitcoin:masterfrom Dec 2, 2021
Merged
Conversation
luke-jr
approved these changes
Nov 30, 2021
Member
luke-jr
left a comment
There was a problem hiding this comment.
utACK. Might have been nicer to review as 2 commits (splitting the formatting/rename changes out of the code removal)
added 2 commits
December 1, 2021 09:30
Can be reviewed with --word-diff-regex=. --ignore-all-space
fa5a3f8 to
fa46ac4
Compare
Member
Author
Thanks. Reworked into two commits. |
shaavan
approved these changes
Dec 1, 2021
Contributor
shaavan
left a comment
There was a problem hiding this comment.
ACK fa46ac4
Complied and ran bitcoind successfully with the following patch:
static_assert(STANDARD_LOCKTIME_VERIFY_FLAGS & LOCKTIME_MEDIAN_TIME_PAST)
This goes to show that the above statement is always true. Hence I agree with removing the conditional part of the code that shall never be reached. The renaming of the variable makes sense and follows our global variable naming convention.
Finally, the formatting changes introduced in the first commit of this PR look good. I checked for possible formatting issues, and I found none.
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Dec 2, 2021
RandyMcMillan
pushed a commit
to RandyMcMillan/mempool-tab
that referenced
this pull request
Dec 23, 2021
337edd2 miner: Remove uncompiled MTP code (MarcoFalke) ae1993b style: Add {} to if-bodies in node/miner (MarcoFalke) Pull request description: This removes uncompiled code. Can be checked by inserting `static_assert(STANDARD_LOCKTIME_VERIFY_FLAGS & LOCKTIME_MEDIAN_TIME_PAST)` and compiling or by reading the source code. Even if the code was compiled, it would be unsafe to execute, since it is not allowed to include transactions that are locked until some time after the current MTP. Also, rename the member to cause explicit merge conflicts in case there is a patch out there referencing the variable. ACKs for top commit: shaavan: ACK 337edd2 theStack: Code-review ACK 337edd2 Tree-SHA512: 0288f45918996b58d0c0060773aa3cb15c828a649439f3d589c5d6b4854d6da1d8c2ea11d5ca06c654532453ab5ce1892de7ca820e284e96e78b959ef87cac5c
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 removes uncompiled code.
Can be checked by inserting
static_assert(STANDARD_LOCKTIME_VERIFY_FLAGS & LOCKTIME_MEDIAN_TIME_PAST)and compiling or by reading the source code.Even if the code was compiled, it would be unsafe to execute, since it is not allowed to include transactions that are locked until some time after the current MTP.
Also, rename the member to cause explicit merge conflicts in case there is a patch out there referencing the variable.