wallet: don’t back-date locktime when replacing/fee bumping #26526

issue 0xB10C openend this issue on November 17, 2022
  1. 0xB10C commented at 5:35 pm on November 17, 2022: member

    As mentioned in #26451 (comment) example 3:

    If we do anti-fee sniping, the Bitcoin Core wallet has a 10% chance to back-date the locktime of a transaction to up to 100 blocks. Electrum has similar behavior.

    https://github.com/bitcoin/bitcoin/blob/48174c0f287b19931ca110670610bd03a03eb914/src/wallet/spend.cpp#L725-L731

    When we fee-bump a transaction, it can happen that we have a higher locktime in replaced transaction that in the replacement transaction. This is a clear indication that we are in fact a Bitcoin Core or Electrum wallet doing the replacement. I think this is something we should try to avoid.

    related: #26527 electrum issue: https://github.com/spesmilo/electrum/issues/8073

  2. 0xB10C added the label Feature on Nov 17, 2022
  3. MarcoFalke added the label Wallet on Nov 17, 2022
  4. MarcoFalke added the label RPC/REST/ZMQ on Nov 17, 2022
  5. Xekyo commented at 8:29 pm on January 10, 2023: member
    Good catch, yes that should be checked when we create a replacement.

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-02-11 21:13 UTC

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