getreceivedbylabel #13704

issue melaxon opened this issue on July 18, 2018
  1. melaxon commented at 6:36 PM on July 18, 2018: none

    <!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->

    Describe the issue bitcoin-cli getreceivedbylabel "xxx" 0 will not return any error if xxx does not exists. Not sure if this is an issue or "works as designed"

    <!--- What behavior did you expect? -->

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    <!--- How reliably can you reproduce the issue, what are the steps to do so? -->

    What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? 0.16.99 compiled What type of machine are you observing the error on (OS/CPU and disk type)? Ubuntu 16.04

    <!-- Any extra information that might be useful in the debugging process. -->

    <!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->

  2. laanwj added the label RPC/REST/ZMQ on Jul 18, 2018
  3. laanwj added the label Wallet on Jul 18, 2018
  4. MarcoFalke added this to the milestone 0.17.0 on Jul 18, 2018
  5. jonasschnelli commented at 8:00 AM on July 19, 2018: contributor

    Should it return an error? IMO its more like a "filtering-technique" (by labels) and an empty list seems to be the better design choice then throwing an error.

  6. melaxon commented at 3:01 PM on July 19, 2018: none

    At least something like 'false' can be returned. Now it shows the balance 0.00 Bitcoins on non-existing label, but it is not true, so it obviously is 'false'.

  7. meshcollider commented at 1:17 AM on July 25, 2018: contributor

    In my opinion, this seems sensible behavior as-is. If nothing is labelled with a particular label then there should be a total of 0 received by that label, I don't think its necessary not logical to return a different type if the label isn't being used.

  8. promag commented at 1:29 AM on July 25, 2018: member

    Use listlabels to see if the label exists? I also agree on the current behavior, and above all, can't be changed because of this.

  9. MarcoFalke closed this on Jul 25, 2018

  10. DrahtBot locked this on Sep 8, 2021

Milestone
0.17.0


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