FreeBSD Manual Pages
LIGHTNING-WAITBLOCKHEIGHT(7) LIGHTNING-WAITBLOCKHEIGHT(7) NAME lightning-waitblockheight -- Command for waiting for blocks on the blockchain SYNOPSIS waitblockheight blockheight [timeout] DESCRIPTION The waitblockheight RPC command waits until the blockchain has reached the specified blockheight. • blockheight (u32): Current blockheight of the blockchain if the value is greater than this number. If it is a present or past block height, then the command returns immediately. • timeout (u32, optional): Only wait up to specified seconds. The de- fault is 60 seconds. RETURN VALUE On success, an object is returned, containing: • blockheight (u32): The current block height (>= blockheight parame- ter). If timeout seconds is reached without the specified blockheight being reached, this command will fail with a code of 2000. ERRORS The following error codes may occur: • 2000: Timed out. AUTHOR ZmnSCPxj <<ZmnSCPxj@protonmail.com>> is mainly responsible. RESOURCES Main web site: <https://github.com/ElementsProject/lightning> EXAMPLES Example 1: This will return immediately since the current blockheight exceeds the requested waitblockheight. Request: $ lightning-cli waitblockheight -k "blockheight"=126 { "id": "example:waitblockheight#1", "method": "waitblockheight", "params": { "blockheight": 126 } } Response: { "blockheight": 130 } Example 2: This will return after the next block is mined because re- quested waitblockheight is one block higher than the current block- height. Request: $ lightning-cli waitblockheight -k "blockheight"=131 "timeout"=600 { "id": "example:waitblockheight#2", "method": "waitblockheight", "params": { "blockheight": 131, "timeout": 600 } } Response: { "blockheight": 131 } Core Lightning v25.02 LIGHTNING-WAITBLOCKHEIGHT(7)
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | ERRORS | AUTHOR | RESOURCES | EXAMPLES
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=lightning-waitblockheight&sektion=7&manpath=FreeBSD+Ports+14.3.quarterly>
