`getpeerinfo` should report minping differently if there never was a ping #7837

issue laanwj opened this issue on April 8, 2016
  1. laanwj commented at 7:53 AM on April 8, 2016: member

    See discussion in #6636. Currently, an implementation detail leaks here:

    "minping": 9223372036854.775,

    This is std::numeric_limits<int64_t>::max() milliseconds, or approximately 300,000 years. What we really want to communicate here is that the information is missing. So it would be better to report it as null.

    "minping": null,

  2. laanwj added the label RPC/REST/ZMQ on Apr 8, 2016
  3. laanwj added the label Easy to implement on Apr 8, 2016
  4. paveljanik commented at 9:30 AM on April 8, 2016: contributor

    Thinking about this a bit, we have a precedent already for not producing some entity based on its value. pingwait is documented:

        "pingwait": n,             (numeric) ping wait
    

    and is not present in the output sometimes based on its value:

            if (stats.dPingWait > 0.0)
                obj.push_back(Pair("pingwait", stats.dPingWait));
    

    So far we have not received comments about this property missing from output...

    So what about doing the same with minping? ;-)

  5. laanwj commented at 9:42 AM on April 8, 2016: member

    I didn't really want to start a discussion here. I'm happy as long as you document it.

  6. laanwj closed this on Apr 14, 2016

  7. DrahtBot 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