miner: Remove uncompiled MTP code #23637

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:2111-minerOnlyMTP changing 2 files +33 −27
  1. MarcoFalke commented at 7:20 pm on November 30, 2021: member

    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.

  2. MarcoFalke added the label Refactoring on Nov 30, 2021
  3. MarcoFalke added the label Mining on Nov 30, 2021
  4. luke-jr approved
  5. luke-jr commented at 11:29 pm on November 30, 2021: member
    utACK. Might have been nicer to review as 2 commits (splitting the formatting/rename changes out of the code removal)
  6. style: Add {} to if-bodies in node/miner
    Can be reviewed with --word-diff-regex=. --ignore-all-space
    fa6b7adf96
  7. miner: Remove uncompiled MTP code fa46ac4d9d
  8. MarcoFalke force-pushed on Dec 1, 2021
  9. MarcoFalke commented at 8:33 am on December 1, 2021: member

    Might have been nicer to review as 2 commits

    Thanks. Reworked into two commits.

  10. shaavan approved
  11. shaavan commented at 12:27 pm on December 1, 2021: contributor

    ACK fa46ac4d9d6dc99572c44c42adc9bc3f41d701d4

    Complied and ran bitcoind successfully with the following patch:

    0static_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.

  12. theStack approved
  13. theStack commented at 5:58 pm on December 1, 2021: member
    Code-review ACK fa46ac4d9d6dc99572c44c42adc9bc3f41d701d4
  14. fanquake merged this on Dec 2, 2021
  15. fanquake closed this on Dec 2, 2021

  16. MarcoFalke deleted the branch on Dec 2, 2021
  17. sidhujag referenced this in commit aa7b27e5ac on Dec 2, 2021
  18. RandyMcMillan referenced this in commit 4193aa36fa on Dec 23, 2021
  19. DrahtBot locked this on Dec 2, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-21 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me