Add option for support_large_channels.
max_funding_sats is a config variable and defaults to the old value.
This commit is contained in:
@@ -141,7 +141,7 @@ class QEChannelOpener(QObject, AuthMixin):
|
||||
return False
|
||||
return True
|
||||
|
||||
# FIXME "max" button in amount_dialog should enforce LN_MAX_FUNDING_SAT
|
||||
# FIXME "max" button in amount_dialog should enforce LIGHTNING_MAX_FUNDING_SAT
|
||||
@pyqtSlot()
|
||||
@pyqtSlot(bool)
|
||||
def openChannel(self, confirm_backup_conflict=False):
|
||||
|
||||
@@ -4,7 +4,7 @@ from PyQt5.QtWidgets import QLabel, QVBoxLayout, QGridLayout, QPushButton, QComb
|
||||
|
||||
from electrum.i18n import _
|
||||
from electrum.transaction import PartialTxOutput, PartialTransaction
|
||||
from electrum.lnutil import LN_MAX_FUNDING_SAT, MIN_FUNDING_SAT
|
||||
from electrum.lnutil import MIN_FUNDING_SAT
|
||||
from electrum.lnworker import hardcoded_trampoline_nodes
|
||||
from electrum import ecc
|
||||
from electrum.util import NotEnoughFunds, NoDynamicFeeEstimates
|
||||
@@ -131,13 +131,13 @@ class NewChannelDialog(WindowModalDialog):
|
||||
self.window.show_error(str(e))
|
||||
return
|
||||
amount = tx.output_value()
|
||||
amount = min(amount, LN_MAX_FUNDING_SAT)
|
||||
amount = min(amount, self.config.LIGHTNING_MAX_FUNDING_SAT)
|
||||
self.amount_e.setAmount(amount)
|
||||
|
||||
def run(self):
|
||||
if not self.exec_():
|
||||
return
|
||||
if self.max_button.isChecked() and self.amount_e.get_amount() < LN_MAX_FUNDING_SAT:
|
||||
if self.max_button.isChecked() and self.amount_e.get_amount() < self.config.LIGHTNING_MAX_FUNDING_SAT:
|
||||
# if 'max' enabled and amount is strictly less than max allowed,
|
||||
# that means we have fewer coins than max allowed, and hence we can
|
||||
# spend all coins
|
||||
|
||||
@@ -34,7 +34,7 @@ from PyQt5.QtWidgets import QAbstractItemView, QMenu, QLabel, QHBoxLayout
|
||||
from electrum.i18n import _
|
||||
from electrum.bitcoin import is_address
|
||||
from electrum.transaction import PartialTxInput, PartialTxOutput
|
||||
from electrum.lnutil import LN_MAX_FUNDING_SAT, MIN_FUNDING_SAT
|
||||
from electrum.lnutil import MIN_FUNDING_SAT
|
||||
from electrum.util import profiler
|
||||
|
||||
from .util import ColorScheme, MONOSPACE_FONT, EnterButton
|
||||
@@ -243,7 +243,7 @@ class UTXOList(MyTreeView):
|
||||
if self.wallet.lnworker is None:
|
||||
return False
|
||||
value = sum(x.value_sats() for x in coins)
|
||||
return value >= MIN_FUNDING_SAT and value <= LN_MAX_FUNDING_SAT
|
||||
return value >= MIN_FUNDING_SAT and value <= self.config.LIGHTNING_MAX_FUNDING_SAT
|
||||
|
||||
def open_channel_with_coins(self, coins):
|
||||
# todo : use a single dialog in new flow
|
||||
|
||||
Reference in New Issue
Block a user