mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
lightningd/peer_control.c: Implement waitblockheight.
This is needed to fully implement handling of blockheight disagreements between us and payee. If payee believes the blockheight is higher than ours, then `pay` should wait for our node to achieve that blockheight. Changelog-Add: Implement `waitblockheight` to wait for a specific blockheight.
This commit is contained in:
committed by
Christian Decker
parent
44e8256338
commit
54cc735201
@@ -997,6 +997,16 @@ class LightningRpc(UnixDomainSocketRpc):
|
||||
}
|
||||
return self.call("waitanyinvoice", payload)
|
||||
|
||||
def waitblockheight(self, blockheight, timeout=None):
|
||||
"""
|
||||
Wait for the blockchain to reach the specified block height.
|
||||
"""
|
||||
payload = {
|
||||
"blockheight": blockheight,
|
||||
"timeout": timeout
|
||||
}
|
||||
return self.call("waitblockheight", payload)
|
||||
|
||||
def waitinvoice(self, label):
|
||||
"""
|
||||
Wait for an incoming payment matching the invoice with {label}
|
||||
|
||||
Reference in New Issue
Block a user