funding: enable push_msat

it's that time of year (merry xmas!)

enables the ability to push_msat on fundchannel

Changelog-Added: RPC: `fundchannel` and `fundchannel_start` can now accept an optional parameter, `push_msat`, which will gift that amount of satoshis to the peer at channel open.
This commit is contained in:
lisa neigut
2019-12-20 23:53:12 -06:00
committed by neil saitug
parent 051b5bd1bf
commit 689dd28ddd
8 changed files with 75 additions and 8 deletions

View File

@@ -548,14 +548,15 @@ class LightningRpc(UnixDomainSocketRpc):
if 'satoshi' in kwargs:
return self._deprecated_fundchannel(node_id, *args, **kwargs)
def _fundchannel(node_id, amount, feerate=None, announce=True, minconf=None, utxos=None):
def _fundchannel(node_id, amount, feerate=None, announce=True, minconf=None, utxos=None, push_msat=None):
payload = {
"id": node_id,
"amount": amount,
"feerate": feerate,
"announce": announce,
"minconf": minconf,
"utxos": utxos
"utxos": utxos,
"push_msat": push_msat
}
return self.call("fundchannel", payload)