mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
test, fundchannel: pass kwargs down to fundchannel command
Allows us to more easily pass through args to `fundchannel` while still using the utility function's funding + open confirmation logics
This commit is contained in:
parent
4926c25bb5
commit
ee329f08de
@ -754,7 +754,8 @@ class LightningNode(object):
|
||||
"LightningNode.fundchannel", category=DeprecationWarning)
|
||||
return self.fundchannel(l2, amount, wait_for_active, announce_channel)
|
||||
|
||||
def fundchannel(self, l2, amount, wait_for_active=True, announce_channel=True):
|
||||
def fundchannel(self, l2, amount, wait_for_active=True,
|
||||
announce_channel=True, **kwargs):
|
||||
# Give yourself some funds to work with
|
||||
addr = self.rpc.newaddr()['bech32']
|
||||
|
||||
@ -775,7 +776,9 @@ class LightningNode(object):
|
||||
wait_for(lambda: has_funds_on_addr(addr))
|
||||
|
||||
# Now go ahead and open a channel
|
||||
res = self.rpc.fundchannel(l2.info['id'], amount, announce=announce_channel)
|
||||
res = self.rpc.fundchannel(l2.info['id'], amount,
|
||||
announce=announce_channel,
|
||||
**kwargs)
|
||||
wait_for(lambda: res['txid'] in self.bitcoin.rpc.getrawmempool())
|
||||
self.bitcoin.generate_block(1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user