pool: add pkg, module & tests
This commit is contained in:
parent
f214a703a5
commit
eb21012745
12 changed files with 215 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ let
|
|||
hwi
|
||||
joinmarket
|
||||
lightning-loop
|
||||
lightning-pool
|
||||
|
||||
## elementsd fails with error
|
||||
# test/key_properties.cpp:16:10: fatal error: rapidcheck/boost_test.h: No such file or directory
|
||||
|
|
|
|||
|
|
@ -50,6 +50,9 @@ let testEnv = rec {
|
|||
|
||||
tests.lightning-loop = cfg.lightning-loop.enable;
|
||||
|
||||
tests.lightning-pool = cfg.lightning-pool.enable;
|
||||
nix-bitcoin.onionServices.lnd.public = true;
|
||||
|
||||
tests.electrs = cfg.electrs.enable;
|
||||
|
||||
tests.liquidd = cfg.liquidd.enable;
|
||||
|
|
@ -120,6 +123,7 @@ let testEnv = rec {
|
|||
services.lnd.enable = true;
|
||||
services.lnd.restOnionService.enable = true;
|
||||
services.lightning-loop.enable = true;
|
||||
services.lightning-pool.enable = true;
|
||||
services.electrs.enable = true;
|
||||
services.liquidd.enable = true;
|
||||
services.btcpayserver.enable = true;
|
||||
|
|
@ -161,6 +165,7 @@ let testEnv = rec {
|
|||
services.spark-wallet.enable = true;
|
||||
services.lnd.enable = true;
|
||||
services.lightning-loop.enable = true;
|
||||
services.lightning-pool.enable = true;
|
||||
services.electrs.enable = true;
|
||||
services.btcpayserver.enable = true;
|
||||
services.joinmarket.enable = true;
|
||||
|
|
@ -202,6 +207,12 @@ let testEnv = rec {
|
|||
server.host=localhost
|
||||
'';
|
||||
|
||||
# lightning-pool contains no builtin auction server for regtest.
|
||||
# Add a dummy definition
|
||||
services.lightning-pool.extraConfig = ''
|
||||
auctionserver=localhost
|
||||
'';
|
||||
|
||||
# Needs wallet support which is unavailable for regtest
|
||||
services.joinmarket.yieldgenerator.enable = mkForce false;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -185,6 +185,20 @@ def _():
|
|||
)
|
||||
|
||||
|
||||
@test("lightning-pool")
|
||||
def _():
|
||||
assert_running("lightning-pool")
|
||||
assert_matches("su operator -c 'pool --version'", "version")
|
||||
# Check that lightning-pool fails with the right error, making sure
|
||||
# lightning-pool can connect to lnd
|
||||
machine.wait_until_succeeds(
|
||||
log_has_string(
|
||||
"lightning-pool",
|
||||
"Waiting for lnd to be fully synced to its chain backend, this might take a while",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@test("btcpayserver")
|
||||
def _():
|
||||
assert_running("nbxplorer")
|
||||
|
|
@ -333,7 +347,9 @@ def _():
|
|||
pre_restart = succeed("date +%s.%6N").rstrip()
|
||||
|
||||
# Sanity-check system by restarting all services
|
||||
succeed("systemctl restart bitcoind clightning lnd lightning-loop spark-wallet liquidd")
|
||||
succeed(
|
||||
"systemctl restart bitcoind clightning lnd lightning-loop lightning-pool spark-wallet liquidd"
|
||||
)
|
||||
|
||||
# Now that the bitcoind restart triggered a banlist import restart, check that
|
||||
# re-importing already banned addresses works
|
||||
|
|
@ -365,6 +381,11 @@ def _():
|
|||
log_has_string("lightning-loop", "Starting event loop at height 10")
|
||||
)
|
||||
succeed("runuser -u operator -- loop getparams")
|
||||
if "lightning-pool" in enabled_tests:
|
||||
machine.wait_until_succeeds(
|
||||
log_has_string("lightning-pool", "lnd is now fully synced to its chain backend")
|
||||
)
|
||||
succeed("runuser -u operator -- pool orders list")
|
||||
|
||||
|
||||
if "netns-isolation" in enabled_tests:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue