[rpcwallet] Don't use floating point #8317

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1607-rpcFloat changing 1 files +3 −3
  1. MarcoFalke commented at 10:06 AM on July 8, 2016: member

    Follow up of 69d605f410c83235aa7b757445e7d0166fcfe2d9

    <sub>fun fact: The refactor in getreceivedbyaddress actually removes the feature to detect if IsMine() was false. You can check getreceivedbyaddress == 0 and isfloat(getreceivedbyaddress)

  2. [rpcwallet] Don't use floating point 477777f250
  3. MarcoFalke added the label Wallet on Jul 8, 2016
  4. MarcoFalke added the label RPC/REST/ZMQ on Jul 8, 2016
  5. MarcoFalke commented at 10:36 AM on July 8, 2016: member

    Before:

    > getreceivedbyaddress $notMineAddress
    < 0
    > getreceivedbyaccount none
    < 0
    > getreceivedbyaccount t2 0
    < 1.111e-05
    

    After:

    > getreceivedbyaddress $notMineAddress
    < 0.00000000
    > getreceivedbyaccount none
    < 0.00000000
    > getreceivedbyaccount t2 0
    < 0.00001111
    
  6. MarcoFalke added the label Needs backport on Jul 8, 2016
  7. jonasschnelli commented at 10:42 AM on July 8, 2016: contributor

    Concept ACK. What's the raw JSON differences? Is this a tiny API change?

  8. MarcoFalke commented at 10:51 AM on July 8, 2016: member

    What's the raw JSON differences? Is this a tiny API change?

    yes, it is two different functions to generate the string. Before it used setFloat and oss << std::setprecision(16) << val;. After, it uses our wrapper function.

  9. jonasschnelli commented at 11:12 AM on July 8, 2016: contributor

    I think we should do this (for 0.14) but would require a short part in the release notes.

  10. laanwj commented at 11:33 AM on July 8, 2016: member

    utACK.

    The numbers may be formatted slightly differently, but it's not an API change from the perspective of a client, it still returns a JSON number where a JSON number was returned. No need to mention this in release notes.

  11. MarcoFalke commented at 11:33 AM on July 8, 2016: member

    release notes

    What would I write there? Let's hope no implementation relies on some numbers being represented by scientific notation. Also note that getreceivedbyaddress (and all other calls) already use ValueFromAmount.

  12. jonasschnelli commented at 11:47 AM on July 8, 2016: contributor

    [...] No need to mention this in release notes.

    Okay for me. utACK 477777f2503e3a56a267556f0fc5091042d93340

  13. laanwj commented at 11:52 AM on July 8, 2016: member

    Okay for me.

    I think we should be careful to not add too much technical details to the explicit descriptions in the release notes. The release notes are already huge, every major release.

    Also remember that every commit/PR already gets a mention with the title.

  14. laanwj merged this on Jul 11, 2016
  15. laanwj closed this on Jul 11, 2016

  16. laanwj referenced this in commit 304eff3c61 on Jul 11, 2016
  17. MarcoFalke deleted the branch on Jul 11, 2016
  18. MarcoFalke removed the label Needs backport on Aug 26, 2016
  19. MarcoFalke added the label Needs backport on Aug 26, 2016
  20. MarcoFalke added this to the milestone 0.12.2 on Aug 26, 2016
  21. MarcoFalke removed the label Needs backport on Nov 23, 2016
  22. MarcoFalke referenced this in commit ad99a79869 on Nov 23, 2016
  23. UdjinM6 referenced this in commit 12aa5ff016 on Mar 22, 2017
  24. UdjinM6 referenced this in commit 912b5b3dbe on Mar 22, 2017
  25. UdjinM6 referenced this in commit ff30aed68f on Apr 11, 2017
  26. thokon00 referenced this in commit 6f33f469b9 on Apr 17, 2018
  27. zkbot referenced this in commit 2c1f65d6e2 on Apr 23, 2018
  28. zkbot referenced this in commit 1c2f24793b on Apr 24, 2018
  29. zkbot referenced this in commit d5b558ba5b on Apr 25, 2018
  30. zkbot referenced this in commit 962ba99b36 on Apr 25, 2018
  31. zkbot referenced this in commit e84f02af8b on May 1, 2018
  32. zkbot referenced this in commit bcd65519ca on May 1, 2018
  33. zkbot referenced this in commit 90304c4214 on May 1, 2018
  34. MarcoFalke locked this on Sep 8, 2021

Milestone
0.12.branch


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