Qt: do not expose watchtower in settings
running a watchtower requires to be able to run a daemon with the watchtower plugin enabled. If users succeed at doing that, we can expect them to be able to configure theclient using the command line. (that would not work with QML, though. maybe QML could use an advanced config editor)
This commit is contained in:
@@ -144,22 +144,6 @@ class SettingsDialog(QDialog, QtEventListener):
|
||||
self.config.LIGHTNING_LEGACY_ADD_TRAMPOLINE = legacy_add_trampoline_cb.isChecked()
|
||||
legacy_add_trampoline_cb.stateChanged.connect(on_legacy_add_trampoline_checked)
|
||||
|
||||
remote_wt_cb = checkbox_from_configvar(self.config.cv.WATCHTOWER_CLIENT_ENABLED)
|
||||
remote_wt_cb.setChecked(self.config.WATCHTOWER_CLIENT_ENABLED)
|
||||
|
||||
def on_remote_wt_checked(_x):
|
||||
self.config.WATCHTOWER_CLIENT_ENABLED = remote_wt_cb.isChecked()
|
||||
self.watchtower_url_e.setEnabled(remote_wt_cb.isChecked())
|
||||
remote_wt_cb.stateChanged.connect(on_remote_wt_checked)
|
||||
watchtower_url = self.config.WATCHTOWER_CLIENT_URL
|
||||
self.watchtower_url_e = QLineEdit(watchtower_url)
|
||||
self.watchtower_url_e.setEnabled(self.config.WATCHTOWER_CLIENT_ENABLED)
|
||||
|
||||
def on_wt_url():
|
||||
url = self.watchtower_url_e.text() or None
|
||||
self.config.WATCHTOWER_CLIENT_URL = url
|
||||
self.watchtower_url_e.editingFinished.connect(on_wt_url)
|
||||
|
||||
lnfee_hlabel = HelpLabel.from_configvar(self.config.cv.LIGHTNING_PAYMENT_FEE_MAX_MILLIONTHS)
|
||||
lnfee_map = [500, 1_000, 3_000, 5_000, 10_000, 20_000, 30_000, 50_000]
|
||||
|
||||
@@ -411,7 +395,6 @@ class SettingsDialog(QDialog, QtEventListener):
|
||||
lightning_widgets = []
|
||||
lightning_widgets.append((trampoline_cb, None))
|
||||
lightning_widgets.append((legacy_add_trampoline_cb, None))
|
||||
lightning_widgets.append((remote_wt_cb, self.watchtower_url_e))
|
||||
lightning_widgets.append((lnfee_hlabel, lnfee_hbox_w))
|
||||
fiat_widgets = []
|
||||
fiat_widgets.append((QLabel(_('Fiat currency')), ccy_combo))
|
||||
|
||||
@@ -2,9 +2,11 @@ from electrum.i18n import _
|
||||
|
||||
fullname = _('Watchtower')
|
||||
description = """
|
||||
Watchtower for Electrum.
|
||||
A watchtower is a daemon that watches your channels and prevents the other party from stealing funds by broadcasting an old state.
|
||||
|
||||
Example setup:
|
||||
Example:
|
||||
|
||||
daemon setup:
|
||||
|
||||
electrum -o setconfig enable_plugin_watchtower True
|
||||
electrum -o setconfig watchtower_user wtuser
|
||||
@@ -12,6 +14,10 @@ Example setup:
|
||||
electrum -o setconfig watchtower_port 12345
|
||||
electrum daemon -v
|
||||
|
||||
client setup:
|
||||
|
||||
electrum -o setconfig watchtower_url http://wtuser:wtpassword@127.0.0.1:12345
|
||||
|
||||
"""
|
||||
|
||||
available_for = ['cmdline']
|
||||
|
||||
@@ -1212,15 +1212,6 @@ Warning: setting this to too low will result in lots of payment failures."""),
|
||||
ZEROCONF_MIN_OPENING_FEE = ConfigVar('zeroconf_min_opening_fee', default=5000, type_=int)
|
||||
|
||||
# connect to remote WT
|
||||
WATCHTOWER_CLIENT_ENABLED = ConfigVar(
|
||||
'use_watchtower', default=False, type_=bool,
|
||||
short_desc=lambda: _("Use a remote watchtower"),
|
||||
long_desc=lambda: ' '.join([
|
||||
_("A watchtower is a daemon that watches your channels and prevents the other party from stealing funds by broadcasting an old state."),
|
||||
_("If you have private a watchtower, enter its URL here."),
|
||||
_("Check our online documentation if you want to configure Electrum as a watchtower."),
|
||||
]),
|
||||
)
|
||||
WATCHTOWER_CLIENT_URL = ConfigVar('watchtower_url', default=None, type_=str)
|
||||
|
||||
# run WT locally
|
||||
|
||||
Reference in New Issue
Block a user