core-lightning/doc/lightning-ping.7.md
ShahanaFarooqui b0da807700 doc: Markdown cleanup
This commit will remove parameter descriptions from RPC markdown but we will fix it in next commits by reading these descriptions directly from json.

- Removing parameter description text
- Adding/removing newlines for cleaner formatting
- Adding ERRORS title wherever needed
- Updating titles for consistency
- Adding resources links
2024-03-19 14:58:59 +10:30

1.3 KiB

lightning-ping -- Command to check if a node is up.

SYNOPSIS

ping id [len] [pongbytes]

DESCRIPTION

The ping command checks if the node with id is ready to talk. It currently only works for peers we have a channel with.

EXAMPLE JSON REQUEST

{
  "id": 82,
  "method": "ping",
  "params": {
    "len": 128,
    "pongbytes": 128
  }
}

RETURN VALUE

On success, an object is returned, containing:

  • totlen (u16): the answer length of the reply message (including header: 0 means no reply expected)

ERRORS

On failure, one of the following error codes may be returned:

  • -32602: Error in given parameters or we're already waiting for a ping response from peer.

EXAMPLE JSON RESPONSE

{
   "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