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.
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-
laanwj commented at 1:45 PM on September 4, 2015: member
- laanwj added the label P2P on Sep 4, 2015
-
paveljanik commented at 2:15 PM on September 4, 2015: contributor
tested ACK It could be shocking for some people to see:
"minping": 0.39083, "minping": 0.139336, "minping": 9223372036854.775,;-)
-
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?
-
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.
- laanwj force-pushed on Sep 4, 2015
- laanwj force-pushed on Sep 4, 2015
-
93ff1b9041
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.
-
sipa commented at 2:36 PM on September 4, 2015: member
ACK on this pull :)
- laanwj merged this on Sep 4, 2015
- laanwj closed this on Sep 4, 2015
- laanwj referenced this in commit 536207f316 on Sep 4, 2015
-
MarcoFalke commented at 3:27 PM on September 4, 2015: member
tested ACK (3f99d70 which is about the same as the merged one)
- laanwj referenced this in commit 3f12515199 on Jan 9, 2019
- laanwj referenced this in commit 070eaf7fe5 on Jan 14, 2019
- random-zebra referenced this in commit 8bbc0650e6 on Jul 1, 2020
- pravblockc referenced this in commit a7a5a1c067 on Aug 9, 2021
- pravblockc referenced this in commit 8e21d90eed on Aug 11, 2021
- pravblockc referenced this in commit 95d588e9b4 on Aug 11, 2021
- 5tefan referenced this in commit bfba8f2211 on Aug 12, 2021
- MarcoFalke locked this on Sep 8, 2021