diff --git a/jmclient/jmclient/configure.py b/jmclient/jmclient/configure.py index 5b78df175..d8db65e75 100644 --- a/jmclient/jmclient/configure.py +++ b/jmclient/jmclient/configure.py @@ -780,6 +780,9 @@ def load_program_config(config_path="", bs=None, plugin_services=[], lnchans = [x for x in chans if "type" in x and x["type"] == "ln-onion"] # only 1; multiple directories will be in this config section: assert len(lnchans) < 2 + # The additional flag 'ln_backend_needed' exists to address + # the case of a user with Lightning configured, but doing a non-interactive + # operation; in this case, starting the Lightning backend is pointless. if lnchans and ln_backend_needed: lnchanconfig = lnchans[0] if lnchanconfig["clightning-location"] == "bundled": diff --git a/scripts/joinmarket-qt.py b/scripts/joinmarket-qt.py index 762b40d01..a22a7a286 100755 --- a/scripts/joinmarket-qt.py +++ b/scripts/joinmarket-qt.py @@ -2343,7 +2343,7 @@ def get_wallet_printout(wallet_service): config_load_error = False try: - load_program_config(config_path=options.datadir) + load_program_config(config_path=options.datadir, ln_backend_needed=True) except Exception as e: config_load_error = "Failed to setup joinmarket: "+repr(e) if "RPC" in repr(e): diff --git a/scripts/tumbler.py b/scripts/tumbler.py index 9a264ae23..bd535132d 100755 --- a/scripts/tumbler.py +++ b/scripts/tumbler.py @@ -25,7 +25,7 @@ def main(): if len(args) < 1: jmprint('Error: Needs a wallet file', "error") sys.exit(EXIT_ARGERROR) - load_program_config(config_path=options['datadir']) + load_program_config(config_path=options['datadir'], ln_backend_needed=True) logsdir = os.path.join(os.path.dirname( jm_single().config_location), "logs") tumble_log = get_tumble_log(logsdir) diff --git a/test/ygrunner.py b/test/ygrunner.py index 0f55266c5..09c12124a 100644 --- a/test/ygrunner.py +++ b/test/ygrunner.py @@ -260,7 +260,7 @@ def get_addr_and_fund(yg): @pytest.fixture(scope="module") def setup_ygrunner(): - load_test_config() + load_test_config(ln_backend_needed=True) jm_single().bc_interface.tick_forward_chain_interval = 10 jm_single().bc_interface.simulate_blocks() # handles the custom regtest hrp for bech32