Fixed "Copy transaction ID" so that subtransaction index is not included #2970

pull aceat64 wants to merge 1 commits into bitcoin:master from aceat64:master changing 1 files +1 −1
  1. aceat64 commented at 5:55 AM on September 4, 2013: none

    When using the context menu to copy a transaction ID, the subtransaction index is added for no apparent reason.

    We don't show the subtransaction index in the details window, so I see no reason why a user would want it appended to their transaction ID from the context menu.

  2. Fixed "Copy transaction ID" so that subtransaction index is not included. 168573fe20
  3. BitcoinPullTester commented at 6:51 AM on September 4, 2013: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/168573fe20aaae7fb0bccd1175047e538cde05d1 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  4. Diapolo commented at 9:25 AM on September 4, 2013: none

    Did you check that TransactionRecord::getTxID() is ONLY used for copying the TxID (to clipboard)?

  5. luke-jr commented at 12:26 PM on September 4, 2013: member

    This loses information for received transactions. Maybe it should be shown in the details?

  6. aceat64 commented at 5:23 PM on September 4, 2013: none

    @Diapolo It appears to only be used for the copy-to-clipboard and CSV export functions. @luke-jr Yeah, I think the details window is the appropriate place for the subtransaction index. It should probably also be included in the CSV export as it's own column.

  7. laanwj commented at 8:59 AM on September 5, 2013: member

    Not sure that I agree with this. Only when the subtransaction (output) id is added, the identifier uniquely identifies a transaction record. If you change this, only change the "copy" and not the other functionality such as CSV export.

  8. gmaxwell commented at 9:22 AM on September 5, 2013: contributor

    The inability to get a vout at all on blockchain.info was seriously screwing with me earlier. Why would we want to exclude the vout index here?

  9. laanwj commented at 10:04 AM on September 5, 2013: member

    Ok, consensus seems to be not to merge this as-is, so I'm closing this. Adding the subtransaction to the details window is still a good idea though.

  10. laanwj closed this on Sep 5, 2013

  11. aceat64 commented at 4:33 PM on September 5, 2013: none

    Is appending a hyphen and the subtransaction ID considered the "standard format"? If so, why doesn't getrawtransaction support it?

    $ bitcoind getrawtransaction a642029ef09d7780c9e13fea3ad8706098f919cb4174870b6284e27353ab1aa7-000 1 error: {"code":-8,"message":"parameter 1 must be hexadecimal string (not 'a642029ef09d7780c9e13fea3ad8706098f919cb4174870b6284e27353ab1aa7-000')"}

  12. laanwj commented at 5:10 PM on September 5, 2013: member

    Because all the bitcoind RPC functions work on whole transactions, not sub-transactions. Only the GUI has that distinction. Getrawtransaction on one output would mean nothing.

  13. aceat64 commented at 5:18 PM on September 5, 2013: none

    Right, that's my point. Everything that refers to the transaction ID specifically does not include the subtransaction index. I believe we are going to confuse users by muddling the term transaction ID to sometimes mean the entire transaction and other times mean the transaction ID with the subtransaction index appended.

  14. laanwj commented at 8:13 AM on September 6, 2013: member

    I think the txid-vout format is pretty clear. It specifies a hierarchical subdivision with -, and the user can delete the part after - easily if he doesn't need it. As there is not a standard format, I think it will do as well as any other.

    In the details window I could call it TxID-vout instead of just TxID, but in the context menu there is no space for further elaboration.

    Simply dropping the vout index loses information that is needed to drill down to that specific subtransaction [From user viewpoint, the subtransaction is the transaction]. And indeed the RPC does not accept TxID-vout format, but that's mainly because the need has never arisen to point at specific subtransactions (AFAIK) so one should remove the subtransaction before submitting it through RPC (which is just deleting the last 4 characters).

    I'm really not convinced that there is a problem (apart from lack of documentation/explanation) here. Unless you have a much better proposal I'd like to keep it this way.

  15. gmaxwell commented at 8:23 AM on September 6, 2013: contributor

    Createrawtransaction and signrawtransaction take a vout, though they take them as separate vout arguments.

    Having the vout is essential to authoring transactions. It's also important when handling payments in order to prevent duplicate keys on the txid when you're paid multiple times in a single transaction.

    When I write them together I normally use txid:vout, I'm not sure where this form comes from. It's a little annoying that the raw transaction api breaks out the vout, but oh well.

  16. Bushstar referenced this in commit d931cb723e on Apr 8, 2020
  17. DrahtBot 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-04-13 21:16 UTC

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