2020-08-21 15:59:24 +02:00
lightning-ping -- Command to check if a node is up.
============================================================
SYNOPSIS
--------
2022-01-26 18:18:49 +01:00
**ping** *id* [*len*] [*pongbytes*]
2020-08-21 15:59:24 +02:00
DESCRIPTION
-----------
2022-12-09 08:10:12 +01:00
The **ping** command checks if the node with *id* is ready to talk.
2021-10-09 07:53:29 +02:00
It currently only works for peers we have a channel with.
2020-08-21 15:59:24 +02:00
EXAMPLE JSON REQUEST
------------
2024-02-02 05:50:25 +01:00
2020-08-21 15:59:24 +02:00
```json
{
"id": 82,
"method": "ping",
"params": {
"len": 128,
"pongbytes": 128
}
}
```
RETURN VALUE
------------
2021-06-16 03:10:17 +02:00
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
2022-09-05 23:33:09 +02:00
2021-06-16 03:10:17 +02:00
- **totlen** (u16): the answer length of the reply message (including header: 0 means no reply expected)
2021-09-03 12:07:59 +02:00
2021-06-16 03:10:17 +02:00
[comment]: # (GENERATE-FROM-SCHEMA-END)
2020-08-21 15:59:24 +02:00
2024-02-02 05:50:25 +01:00
ERRORS
------
2020-08-21 15:59:24 +02:00
On failure, one of the following error codes may be returned:
2020-08-31 14:42:28 +02:00
2021-10-09 07:53:29 +02:00
- -32602: Error in given parameters or we're already waiting for a ping response from peer.
2020-08-21 15:59:24 +02:00
EXAMPLE JSON RESPONSE
-----
2024-02-02 05:50:25 +01:00
2020-08-21 15:59:24 +02:00
```json
{
"totlen": 132
}
```
AUTHOR
------
Vincenzo Palazzo < < vincenzo.palazzo @ protonmail . com > > wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command.
SEE ALSO
--------
lightning-connect(7)
RESOURCES
---------
Main web site: < https: / / github . com / ElementsProject / lightning >
2022-12-09 08:10:12 +01:00
2024-01-25 01:28:53 +01:00
[comment]: # ( SHA256STAMP:3d65bfe95b32d6f1229fcf9215045516ff04e670de8ba0485e585d699e1b1f71)