Add missing information to listtransactions/gettransaction which is required for reliable tracking of outputs in some rare situations #4573

issue sinacc opened this issue on July 22, 2014
  1. sinacc commented at 11:02 PM on July 22, 2014: none

    Use case: a transaction which has several outputs to the same local wallet address. Currently listtransactions lists every transaction/address-of-output combination (if there are multiple addresses in local wallet, and a transaction has outputs that go to several of them) as a separate entry in it's JSON output. However, if there are several outputs to the same address, they are also printed as multiple entries in JSON, and therefore they lack information that could be used by the JSON client to reliably identify them. (They may differ in the amount, but may not.) The same problem exists in the output of gettransaction, even though it's easier to work around in the JSON client there since it will return all related outputs in the same output. The workaround is next to impossible in listtransactions, since it's output basically relies on how the rest of the transaction list looks. Being able to identify those entires apart is very needed there.

    Proposal: The easiest way seems to be include output id (within the transaction) as a field on each output entry returned in JSON.

    It would look something like: { "account" : "", "address" : "1ADDRESS8969349663986", "category" : "receive", ........ "amount" : 11.325, "outputindex": 5 }, This field (outputindex) could be used by the JSON client to identify these output entries, even if they have the same txid and target address.

    The same change should be added in gettransaction.

  2. sinacc renamed this:
    Add missing information to listtransactions/gettransaction which is required for reliable tracking of inputs in rare situations
    Add missing information to listtransactions/gettransaction which is required for reliable tracking of outputs in some rare situations
    on Jul 22, 2014
  3. sipa commented at 11:04 PM on July 22, 2014: member

    Fixed in #4255

  4. sipa closed this on Jul 22, 2014

  5. sinacc commented at 11:06 PM on July 22, 2014: none

    I see, sorry, checked only against the latest stable release, didn't think someone else would find this exact thing so recently :).

  6. sipa commented at 11:09 PM on July 22, 2014: member

    No worries; I'm glad something that people care about got fixed.

  7. bitcoin locked this on Sep 8, 2021

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:55 UTC