GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
LIGHTNING-WAITBLOCKHEIGHT(7) LIGHTNING-WAITBLOCKHEIGHT(7)

lightning-waitblockheight -- Command for waiting for blocks on the blockchain

waitblockheight blockheight [timeout]

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 default is 60 seconds.

On success, an object is returned, containing:

blockheight (u32): The current block height (>= blockheight parameter).

If timeout seconds is reached without the specified blockheight being reached, this command will fail with a code of 2000.

The following error codes may occur:

2000: Timed out.

ZmnSCPxj <ZmnSCPxj@protonmail.com> is mainly responsible.

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

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 requested waitblockheight is one block higher than the current blockheight.

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.2

Search for    or go to Top of page |  Section 7 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.