home | help
LIGHTNING-GRACEFUL(7)					   LIGHTNING-GRACEFUL(7)

NAME
     graceful -- Command to prepare Core Lightning node for stopping.

SYNOPSIS
     graceful [timeout]

DESCRIPTION
     Command added in v26.06.

     graceful is a RPC command to prevent further htlcs, and disconnect all idle
     peers.  It returns when all HTLCs are complete, and all peers disconnected:
     then  you	can shutdown.  It also sends notifications about HTLC expiry, so
     you can judge how long it is safe to be offline.  With a timeout, it always
     returns after that many seconds: if any peer connections or HTLCs are still
     pending, those are returned.  An empty response means nothing is pending

     *	timeout (u32, optional): If set, the graceful command will return  after
	this  time even if not all HTLCs have terminated.  Useful for scripting,
	where you may want to follow with stop.

RETURN VALUE
     On success, an object is returned, containing:

     *	pending_htlc_expiries (array of u32s,  optional):  The	(sorted)  expiry
	blockheights of all HTLCs which are not resolved:
	*  (u32, optional)
     *	pending_peers  (array  of  pubkeys, optional): Any peers still connected
	(presumably because they have outstanding HTLCs):
	*  (pubkey, optional)

AUTHOR
     Rusty Russell rusty@rustcorp.com.au is mainly responsible.

SEE ALSO
     lightning-stop(7)

RESOURCES
     Main web site: https://github.com/ElementsProject/lightning

EXAMPLES
     Example 1:

     Request:

     $ lightning-cli graceful

     {
       "id": "example:graceful#1",
       "method": "graceful",
       "params": {}
     }

     Response:

     {}

Core Lightning v26.06.1 				   LIGHTNING-GRACEFUL(7)

home | help