Add from_me and bip125-replaceable to listunspent and gettransaction #12862

pull GabrielDav wants to merge 4 commits into bitcoin:master from GabrielDav:11613-rpc-transaction-expose-source changing 6 files +94 −22
  1. GabrielDav commented at 7:56 PM on April 2, 2018: contributor

    This closes #11613

    • Added from_me to listunspent and gettransaction. This field indicates whether the source of the transaction was an address on the current node
    • Added source query filter to listunspent. Using this filter a user can list transactions from all sources (all), only from the current node (from_me) or from external sources (external)
    • Added bip125-replaceable to listunspent. This field indicates whether the transactions was marked as bip125-replaceable
  2. Add from_me and bip125-replaceable to listunspent and gettransaction
    * Added ```from_me``` to ```listunspent``` and ```gettransaction```. This field indicates whether the source of the transaction was an address on the current node
    * Added ```source``` query filter to ```listunspent```. Using this filter a user can list transactions from all sources (all), only from the current node (from_me) or from external sources (external)
    * Added ```bip125-replaceable``` to ```listunspent```. This field indicates whether the transactions was marked as bip125-replaceable
    f18b2c1dd3
  3. Merge branch 'master' into 11613-rpc-transaction-expose-source 087c59a546
  4. meshcollider added the label Wallet on Apr 2, 2018
  5. meshcollider added the label RPC/REST/ZMQ on Apr 2, 2018
  6. RHavar commented at 1:09 AM on April 3, 2018: contributor

    Concept ACK.

    Nit: I think from_me should be a boolean not a string for yes|no. I also think all the filtering stuff is a mess, and there's probably no point adding to it. Especially something like this is so easy to "client side" filter, I don't think there's really much gains by supporting it. (But don't really care either way, just seems like more code)

  7. GabrielDav commented at 11:19 AM on April 3, 2018: contributor

    @RHavar

    I think from_me should be a boolean not a string for yes|no

    Yes, needs to be fixed. Confusion was caused by replaceable which can have non binary values.

    I also think all the filtering stuff is a mess, and there's probably no point adding to it

    I agree. However, there is no clear solution - either this needs to be marked as obsolete/to remove, or it needs to be updated when adding new output fields. Usually query is added when either:

    • Data extraction have additional cost that can be reduced querying beforehand. This is not the case here since the data needed is already extracted before applying query.
    • List is ever expanding. Again, this is not the case because list might change size depending on number of wallets and unused inputs. I would not expect this list to be too large to handle in the future.

    It would be nice to get additional opinion and potentially create an issue to remove query parameters. But as it stands now the proper way to add new output fields is to add them in query as well to be consistent with intentions of this method.

  8. Merge branch 'master' of https://github.com/bitcoin/bitcoin into 11613-rpc-transaction-expose-source 64c3402db1
  9. Change 'gettransaction' 'from_me' to return bool instead of yes|no 0f984fe3af
  10. MarcoFalke added the label Needs rebase on Jun 6, 2018
  11. laanwj commented at 5:21 PM on July 5, 2018: member

    Needs rebase

  12. MarcoFalke commented at 10:59 AM on August 26, 2018: member

    Closing for now. Let me know when you want to continue working on this.

  13. MarcoFalke closed this on Aug 26, 2018

  14. laanwj removed the label Needs rebase on Oct 24, 2019
  15. DrahtBot locked this on Dec 16, 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 15:15 UTC

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