diff --git a/test/tests.nix b/test/tests.nix index 193c9f4..190616f 100644 --- a/test/tests.nix +++ b/test/tests.nix @@ -95,6 +95,7 @@ let }; # Needed to test macaroon creation environment.systemPackages = mkIfTest "btcpayserver" (with pkgs; [ openssl xxd ]); + test.data.btcpayserver-lbtc = config.services.btcpayserver.lbtc; tests.joinmarket = cfg.joinmarket.enable; tests.joinmarket-yieldgenerator = cfg.joinmarket.yieldgenerator.enable; @@ -264,6 +265,21 @@ let # `validatepegin` is incompatible with regtest services.liquidd.validatepegin = mkForce false; + + # TODO-EXTERNAL: + # Reenable `btcpayserver.lbtc` in regtest (and add test in tests.py) + # when nbxplorer can parse liquidd regtest blocks. + # + # When `btcpayserver.lbtc` is enabled in regtest, nxbplorer tries to + # generate regtest blocks, which fails because no liquidd wallet exists. + # When blocks are pre-generated via `liquidd.postStart`, nbxplorer + # fails to parse the blocks: + # info: NBXplorer.Indexer.LBTC: Full node version detected: 210002 + # info: NBXplorer.Indexer.LBTC: NBXplorer is correctly whitelisted by the node + # fail: NBXplorer.Indexer.LBTC: Unhandled exception in the indexer, retrying in 10 seconds + # System.IO.EndOfStreamException: No more byte to read + # at NBitcoin.BitcoinStream.ReadWriteBytes(Span`1 data) + services.btcpayserver.lbtc = mkForce false; }; ## Examples / debug helper diff --git a/test/tests.py b/test/tests.py index c6cab60..9f2f386 100644 --- a/test/tests.py +++ b/test/tests.py @@ -188,7 +188,7 @@ def _(): def _(): assert_running("nbxplorer") machine.wait_until_succeeds(log_has_string("nbxplorer", "BTC: RPC connection successful")) - if "liquidd" in enabled_tests: + if test_data["btcpayserver-lbtc"]: machine.wait_until_succeeds(log_has_string("nbxplorer", "LBTC: RPC connection successful")) wait_for_open_port(ip("nbxplorer"), 24444) @@ -399,12 +399,6 @@ def _(): succeed("runuser -u operator -- pool orders list") if enabled("btcpayserver"): machine.wait_until_succeeds(log_has_string("nbxplorer", f"BTC: Starting scan at block {num_blocks}")) - # TODO-EXTERNAL: - # nbxplorer 2.2.16 currently fails with with lbtc (liquidd) on regtest - # LBTC: Full node version detected: 210000 - # LBTC: RPC connection successful - # LBTC: Failed to connect to RPC - # System.IO.EndOfStreamException: No more byte to read if "netns-isolation" in enabled_tests: def ip(name):