1
0

ln: don't make invoice if peer can't possibly pay, append _sat to sat

parameters to avoid confusion
This commit is contained in:
Janus
2018-05-30 13:47:46 +02:00
committed by ThomasV
parent b74d4261af
commit 7d2a6d83d5
2 changed files with 16 additions and 11 deletions

View File

@@ -765,8 +765,8 @@ class Commands:
# lightning network commands
@command('wpn')
def open_channel(self, node_id, amount, push_msat=0, password=None):
self.wallet.lnworker.open_channel(node_id, satoshis(amount), push_msat, password)
def open_channel(self, node_id, amount, channel_push=0, password=None):
self.wallet.lnworker.open_channel(node_id, satoshis(amount), satoshis(channel_push), password)
@command('wn')
def reestablish_channel(self):
@@ -777,8 +777,9 @@ class Commands:
self.wallet.lnworker.pay(invoice)
@command('wn')
def addinvoice(self, amount, message):
return self.wallet.lnworker.add_invoice(satoshis(amount), message)
def addinvoice(self, requested_amount, message):
# using requested_amount because it is documented in param_descriptions
return self.wallet.lnworker.add_invoice(satoshis(requested_amount), message)
@command('wn')
def listchannels(self):
@@ -841,7 +842,7 @@ command_options = {
'timeout': (None, "Timeout in seconds"),
'force': (None, "Create new address beyond gap limit, if no more addresses are available."),
'pending': (None, "Show only pending requests."),
'push_msat': (None, 'push millisatoshis'),
'channel_push':(None, 'Push initial amount (in BTC)'),
'expired': (None, "Show only expired requests."),
'paid': (None, "Show only paid requests."),
'show_addresses': (None, "Show input and output addresses"),