Skip to content

Commit

Permalink
pyln: Rename LightningNode.fund_channel to fundchannel
Browse files Browse the repository at this point in the history
It is inconsistent with the RPC method, which was bothering me for some time.
  • Loading branch information
cdecker committed Sep 18, 2020
1 parent f677885 commit 9fb610c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contrib/pyln-testing/pyln/testing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,11 @@ def restart(self, timeout=10, clean=True):
self.start()

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
addr = self.rpc.newaddr()['bech32']
self.bitcoin.rpc.sendtoaddress(addr, (amount + 1000000) / 10**8)
Expand Down

0 comments on commit 9fb610c

Please sign in to comment.