Changed getnetworkhps value to double to avoid overflow. #7480

pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:hashps changing 1 files +1 −1
  1. instagibbs commented at 3:51 PM on February 8, 2016: member

    Fixes #7476

  2. Changed getnetworkhps value to double to avoid overflow. 993d089e82
  3. laanwj added the label RPC on Feb 8, 2016
  4. laanwj commented at 3:56 PM on February 8, 2016: member

    That was easy :)

    utACK

  5. laanwj added the label Needs backport on Feb 8, 2016
  6. MarcoFalke commented at 6:11 PM on February 8, 2016: member

    Tested ACK 993d089

    I don't get why a cast to int was done in the first place.

  7. dcousens commented at 3:49 AM on February 9, 2016: contributor

    utACK

  8. paveljanik commented at 7:05 AM on February 9, 2016: contributor

    ACK https://github.com/instagibbs/bitcoin/commit/993d089e82fc045d7b0f23e1a5dc934cba0e3306

    Before:

    $ btctest getnetworkhashps
    1795134992997
    $
    

    After:

    $ btctest getnetworkhashps
    1795134992997.291
    $
    
  9. dcousens commented at 7:23 AM on February 9, 2016: contributor

    We could still round the value if desired.

  10. MarcoFalke commented at 8:32 AM on February 9, 2016: member

    We could still round the value if desired.

    Right, but I can't see how this could be desired as this would imply we have integer precision on the estimation, which is not true.

  11. laanwj commented at 10:06 AM on February 9, 2016: member

    Agree with @MarcoFalke that rounding gives the wrong idea here that we actually know what the precision of this estimate is.

  12. laanwj merged this on Feb 9, 2016
  13. laanwj closed this on Feb 9, 2016

  14. laanwj referenced this in commit b49a623799 on Feb 9, 2016
  15. laanwj referenced this in commit c3faf78c0e on Feb 10, 2016
  16. laanwj removed the label Needs backport on Feb 10, 2016
  17. laanwj commented at 7:46 PM on February 10, 2016: member

    Backported to 0.12 as c3faf78c0e96a8c64a5ff8c37ef6fc4cfb35d125

  18. MarcoFalke 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 15:15 UTC

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