ping
doesn't return anything so what is it used for?
If a user wants to ping and check ping time for all peers, getpeerinfo
can be used.
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.
Sign up to join this communityping
doesn't return anything so what is it used for?
If a user wants to ping and check ping time for all peers, getpeerinfo
can be used.
The help text is your friend:
Requests that a ping be sent to all other nodes, to measure ping time.
Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds.
Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping
After you use ping
, you may see a new field, pingwait
, in the getpeerinfo
output. This is the time for waiting for the ping response. You will also see pingtime
being updated once the peer responds to the ping. The purpose is to get an update on the ping times since the ping time reported may have been measured a long time ago.
getpeerinfo
for one peer before ping: pastebin.com/s81cmpu7 getpeerinfo
for same peer after ping
: pastebin.com/6ZUgWTZ4 I don't see pingwait
in it. pingtime
changed from 0.077075 to 0.077956 but it changes regularly even without running ping
command