![]() |
![]()
| ![]() |
![]()
NAMElightning-waitblockheight -- Command for waiting for blocks on the blockchain SYNOPSISwaitblockheight blockheight [timeout] DESCRIPTIONThe waitblockheight RPC command waits until the blockchain has reached the specified blockheight.
RETURN VALUEOn success, an object is returned, containing:
If timeout seconds is reached without the specified blockheight being reached, this command will fail with a code of 2000. ERRORSThe following error codes may occur:
AUTHORZmnSCPxj <ZmnSCPxj@protonmail.com> is mainly responsible. RESOURCESMain web site: https://github.com/ElementsProject/lightning EXAMPLESExample 1: This will return immediately since the current blockheight exceeds the requested waitblockheight. Request: $ lightning-cli waitblockheight -k "blockheight"=126 { Response: { 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 { Response: {
|