MarcoFalke 28bdaa3f76
Merge bitcoin/bitcoin#24080: policy: Remove unused locktime flags
fa8d4d9128c35de0fe715f2e2b99269d23c09cc1 scripted-diff: Clarify CheckFinalTxAtTip name (MarcoFalke)
fa4e30b0f36f2e7a09db7d30dca9008ed9dbcb35 policy: Remove unused locktime flags (MarcoFalke)

Pull request description:

  The locktime flags have many issues:
  * They are passed in by a default argument, which is fragile. It has already lead to bugs like the one fixed in commit e30b6ea194fee3bb95a45e7b732a99566b88f1f5.
  * They are negative (signed), which doesn't make sense for flags (unsigned in general). According to the review comments when the code was added: "The max on the flags is a fairly weird operation." (https://github.com/bitcoin/bitcoin/pull/6566#issuecomment-150310861)
  * No call site relies on the default argument and they all pass in a single compile-time constant, rendering most of the code dead and untested.
  * The dead code calls `GetAdjustedTime` (network adjusted time), which has its own issues. See https://github.com/bitcoin/bitcoin/issues/4521

  Fix all issues by removing them

ACKs for top commit:
  ajtowns:
    ACK  fa8d4d9128c35de0fe715f2e2b99269d23c09cc1
  theStack:
    Code-review ACK fa8d4d9128c35de0fe715f2e2b99269d23c09cc1
  glozow:
    ACK fa8d4d9128c35de0fe715f2e2b99269d23c09cc1, agree the default arg `flags` is a massive footgun and just setting max flags is weird. Adding `AtTip` to the names makes sense to me, since they're both testing for *next* block and only ever used for {,re}addition to mempool.

Tree-SHA512: 79f4a52f34909eb598d88bbae7afe8abe5f85f45c128483d16aa83dacd0e5579e561b725d01b1e9a931d1821012a51ad2bc6fb2867f8d09ee541f9d234d696f8
2022-03-14 16:32:23 +01:00
..
2022-03-02 12:09:27 +01:00
2022-02-17 03:42:08 +09:00
2022-03-02 12:09:27 +01:00
2022-01-31 16:53:12 +01:00
2021-12-30 19:36:57 +02:00
2022-02-25 14:16:32 +01:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2022-01-02 11:40:31 +01:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2022-02-13 20:59:07 +00:00
2022-01-02 11:40:31 +01:00
2021-12-30 19:36:57 +02:00
2022-01-02 11:40:31 +01:00
2022-01-02 11:52:11 +01:00
2021-12-30 19:36:57 +02:00
2022-01-02 11:13:40 +01:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2022-01-02 11:40:31 +01:00
2022-01-28 18:07:08 +10:00