2020-08-21 15:59:24 +02:00
lightning-ping -- Command to check if a node is up.
============================================================
SYNOPSIS
--------
**ping** *id* \[len\] \[pongbytes\]
DESCRIPTION
-----------
2020-09-07 12:46:28 +02:00
The **ping** command checks if the node with *id* is ready to talk. It accepts the following parameters:
2020-08-21 15:59:24 +02:00
2020-09-07 12:46:28 +02:00
- *id*: A string that represents the node id;
- *len*: A integer that represents the length of the ping (default 128);
- *pongbytes*: An integer that represents the length of the reply (default 128).
2020-08-21 15:59:24 +02:00
EXAMPLE JSON REQUEST
------------
```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:
- **totlen** (u16): the answer length of the reply message (including header: 0 means no reply expected)
[comment]: # (GENERATE-FROM-SCHEMA-END)
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
2020-09-07 12:46:28 +02:00
- -32602: Error in given parameters or unknown peer.
2020-08-21 15:59:24 +02:00
EXAMPLE JSON RESPONSE
-----
```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 >
2021-06-16 03:10:17 +02:00
[comment]: # ( SHA256STAMP:56bf89ba67c8e1db1bf3c2cf793d59eecd0c5c23012ffb66fe3f8fa8f7d9007c)