mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
pyln: Rename LightningNode.fund_channel to fundchannel
It is inconsistent with the RPC method, which was bothering me for some time.
This commit is contained in:
committed by
Rusty Russell
parent
8ecb157af6
commit
668debb74f
@@ -741,7 +741,11 @@ class LightningNode(object):
|
|||||||
self.start()
|
self.start()
|
||||||
|
|
||||||
def fund_channel(self, l2, amount, wait_for_active=True, announce_channel=True):
|
def fund_channel(self, l2, amount, wait_for_active=True, announce_channel=True):
|
||||||
|
warnings.warn("LightningNode.fund_channel is deprecated in favor of "
|
||||||
|
"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):
|
||||||
# Give yourself some funds to work with
|
# Give yourself some funds to work with
|
||||||
addr = self.rpc.newaddr()['bech32']
|
addr = self.rpc.newaddr()['bech32']
|
||||||
self.bitcoin.rpc.sendtoaddress(addr, (amount + 1000000) / 10**8)
|
self.bitcoin.rpc.sendtoaddress(addr, (amount + 1000000) / 10**8)
|
||||||
|
|||||||
Reference in New Issue
Block a user