mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
lightningd: addgossip API to inject gossip messages.
Importantly, this is synchronous, so pay will be able to use it reliably. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
f1c599516e
commit
3c5502426b
@@ -484,6 +484,15 @@ class LightningRpc(UnixDomainSocketRpc):
|
||||
if patch_json:
|
||||
monkey_patch_json(patch=True)
|
||||
|
||||
def addgossip(self, message):
|
||||
"""
|
||||
Inject this (hex-encoded) gossip message.
|
||||
"""
|
||||
payload = {
|
||||
"message": message,
|
||||
}
|
||||
return self.call("addgossip", payload)
|
||||
|
||||
def autocleaninvoice(self, cycle_seconds=None, expired_by=None):
|
||||
"""
|
||||
Sets up automatic cleaning of expired invoices. {cycle_seconds} sets
|
||||
|
||||
Reference in New Issue
Block a user