channeld: support private channel creation, fixes #2125

Adds a new 'announce' field for `fundchannel`, which if false
won't broadcast a `channel_announcement`.
This commit is contained in:
lisa neigut
2018-12-07 15:38:41 -08:00
committed by neil saitug
parent eab992cecd
commit a39c97c960
5 changed files with 47 additions and 5 deletions

View File

@@ -361,14 +361,17 @@ class LightningRpc(UnixDomainSocketRpc):
}
return self.call("listpeers", payload)
def fundchannel(self, node_id, satoshi, feerate=None):
def fundchannel(self, node_id, satoshi, feerate=None, announce=True):
"""
Fund channel with {id} using {satoshi} satoshis"
Fund channel with {id} using {satoshi} satoshis
with feerate of {feerate} (uses default feerate if unset).
If {announce} is False, don't send channel announcements.
"""
payload = {
"id": node_id,
"satoshi": satoshi,
"feerate": feerate
"feerate": feerate,
"announce": announce
}
return self.call("fundchannel", payload)