net: correctly initialize nMinPingUsecTime #6636

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2015_09_initialize_minpingtime changing 1 files +1 −0
  1. laanwj commented at 1:45 pm on September 4, 2015: member
    nMinPingUsecTime was left uninitialized in CNode. The correct initialization for a minimum-until-now is int64_t’s max value, so initialize it to that. Thanks @MarcoFalke for noticing.
  2. laanwj added the label P2P on Sep 4, 2015
  3. paveljanik commented at 2:15 pm on September 4, 2015: contributor

    tested ACK It could be shocking for some people to see:

    0    "minping": 0.39083,
    1    "minping": 0.139336,
    2    "minping": 9223372036854.775,
    

    ;-)

  4. sipa commented at 2:21 pm on September 4, 2015: member

    Untested ACK.

    However, if you care for bikeshedding: how about returning null, or not even including the entry if there is no result?

  5. laanwj commented at 2:24 pm on September 4, 2015: member
    I think there’s some confusion here: I’m fine with changing what is returned on RPC, but that’s not the point of this pull. RPC code isn’t even touched. The idea is to fix the connection slot DoS exhaustion #6374, which uses this newly-introduced CNode field.
  6. laanwj force-pushed on Sep 4, 2015
  7. laanwj force-pushed on Sep 4, 2015
  8. net: correctly initialize nMinPingUsecTime
    `nMinPingUsecTime` was left uninitialized in CNode.
    The correct initialization for a minimum-until-now is int64_t's max value, so initialize it to that.
    Thanks @MarcoFalke for noticing.
    93ff1b9041
  9. sipa commented at 2:36 pm on September 4, 2015: member
    ACK on this pull :)
  10. laanwj merged this on Sep 4, 2015
  11. laanwj closed this on Sep 4, 2015

  12. laanwj referenced this in commit 536207f316 on Sep 4, 2015
  13. MarcoFalke commented at 3:27 pm on September 4, 2015: member
    tested ACK (3f99d70 which is about the same as the merged one)
  14. laanwj referenced this in commit 3f12515199 on Jan 9, 2019
  15. laanwj referenced this in commit 070eaf7fe5 on Jan 14, 2019
  16. random-zebra referenced this in commit 8bbc0650e6 on Jul 1, 2020
  17. pravblockc referenced this in commit a7a5a1c067 on Aug 9, 2021
  18. pravblockc referenced this in commit 8e21d90eed on Aug 11, 2021
  19. pravblockc referenced this in commit 95d588e9b4 on Aug 11, 2021
  20. 5tefan referenced this in commit bfba8f2211 on Aug 12, 2021
  21. 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: 2024-07-03 13:13 UTC

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