refactor: Replace `struct update_lock_points` with lambda #23958

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:220103-updatelp changing 2 files +1 −11
  1. hebasto commented at 2:00 PM on January 3, 2022: member

    This change makes code concise and improves it readability.

  2. refactor: Replace `struct update_lock_points` with lambda
    This change makes code concise and improves it readability.
    b32a43fbbc
  3. DrahtBot commented at 2:32 PM on January 3, 2022: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #24080 (policy: Remove unused locktime flags by MarcoFalke)
    • #23976 (document and clean up MaybeUpdateMempoolForReorg by glozow)
    • #23897 (refactor: Separate lockpoint calculate logic from CheckSequenceLocks function by hebasto)

    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.

  4. DrahtBot added the label Mempool on Jan 3, 2022
  5. DrahtBot added the label Refactoring on Jan 3, 2022
  6. DrahtBot added the label Validation on Jan 3, 2022
  7. DrahtBot cross-referenced this on Jan 3, 2022 from issue refactor: Move calculation logic out from `CheckSequenceLocksAtTip()` by hebasto
  8. DrahtBot cross-referenced this on Jan 5, 2022 from issue document and clean up MaybeUpdateMempoolForReorg by glozow
  9. glozow commented at 10:37 AM on January 14, 2022: member

    Concept ACK

    It seems like these structs were introduced (https://github.com/bitcoin/bitcoin/pull/6654/commits/5add7a74a672cb12b0a2a630d318d9bc64dd0f77) before the codebase required a C++11 compiler (https://github.com/bitcoin/bitcoin/pull/7165/commits/67969af09f4729d041589da5f31ac40c07d2f4be), so no lambdas.

    Since we're doing this here, I think it makes sense to modernize the other ones too: https://github.com/bitcoin/bitcoin/blob/807169e10b4a18324356ed6ee4d69587b96a7c70/src/txmempool.cpp#L26-L65

  10. DrahtBot cross-referenced this on Jan 16, 2022 from issue policy: Remove unused locktime flags by MarcoFalke
  11. hebasto commented at 3:10 AM on January 18, 2022: member

    Closing in favor of #23976.

  12. hebasto closed this on Jan 18, 2022

  13. hebasto deleted the branch on Feb 2, 2022
  14. bitcoin locked this on Feb 2, 2023

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: 2026-05-20 06:53 UTC