Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear documentation about TX replacements in gettransaction #27781

Closed
1 task done
torkelrogstad opened this issue May 30, 2023 · 2 comments
Closed
1 task done

Unclear documentation about TX replacements in gettransaction #27781

torkelrogstad opened this issue May 30, 2023 · 2 comments

Comments

@torkelrogstad
Copy link
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:

 "replaced_by_txid" : "hex",              (string, optional) The txid if this tx was replaced.
 "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

@maflcko
Copy link
Member

maflcko commented May 30, 2023

Pull requests welcome :)

torkelrogstad added a commit to torkelrogstad/bitcoin that referenced this issue Jun 1, 2023
achow101 added a commit that referenced this issue Jan 24, 2024
…elp output

ff54314 wallet: clarify replaced_by_txid and replaces_txid in help output (marco)

Pull request description:

  Resolves issue #27781

ACKs for top commit:
  achow101:
    ACK ff54314
  ryanofsky:
    Code review ACK ff54314. Seems like a helpful clarification

Tree-SHA512: b13a0e24505dfaee083467ac6f357b96460b5d1841dc29c4df4a503c290d379cef3d50fcc76f33bbc95741f484dd9d2461b0c2e8bdebf57a8a72edfbeece2a79
@delta1
Copy link

delta1 commented Feb 8, 2024

looks like this issue can be closed as complete?

@maflcko maflcko closed this as completed Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants