mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user