Unclear documentation about TX replacements in gettransaction #27781

issue torkelrogstad openend this issue on May 30, 2023
  1. torkelrogstad commented at 4:00 pm on May 30, 2023: contributor

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    The two fields about TXID replacement in gettransaction currently says this:

    0 "replaced_by_txid" : "hex",              (string, optional) The txid if this tx was replaced.
    1 "replaces_txid" : "hex",                 (string, optional) The txid if the tx replaces one.
    

    From looking at the code it appears these fields are only set if the TXs in question are replaced by the wallet itself. This was not obvious to me.

    Expected behaviour

    I’d expect the documentation to mention that these fields are only set for transactions that originate from the wallet, and not for transactions received into the wallet.

    Steps to reproduce

    1. Receive a fee-bumped transaction to a Bitcoin Core wallet.
    2. Observe that calling gettransaction on that transaction does not include the replaced_by_txid or replaces_txid fields.

    Relevant log output

    No response

    How did you obtain Bitcoin Core

    Pre-built binaries

    What version of Bitcoin Core are you using?

    v24.0.1

    Operating system and version

    MacOS Ventura 13.2.1

    Machine specifications

    No response

  2. maflcko added the label Wallet on May 30, 2023
  3. maflcko added the label RPC/REST/ZMQ on May 30, 2023
  4. maflcko added the label Docs on May 30, 2023
  5. maflcko commented at 4:08 pm on May 30, 2023: member
    Pull requests welcome :)
  6. torkelrogstad referenced this in commit d6f77ae573 on Jun 1, 2023
  7. maflcko added the label good first issue on Nov 13, 2023
  8. achow101 referenced this in commit 207220ce8b on Jan 24, 2024
  9. delta1 commented at 6:16 pm on February 8, 2024: none
    looks like this issue can be closed as complete?
  10. maflcko closed this on Feb 8, 2024


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-22 03:12 UTC

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