clightning: native database replication

Don't put `clightning.replication` options in
`examples/configuration.nix` until it is more "battle-tested."
This commit is contained in:
nixbitcoin
2022-01-06 12:40:52 +00:00
parent 55fc77d72f
commit 17507835fc
11 changed files with 538 additions and 9 deletions

View File

@@ -153,6 +153,14 @@ def _():
# This is a one-shot service, so this command only succeeds if the service succeeds
succeed("systemctl start clightning-feeadjuster")
if test_data["clightning-replication"]:
replica_db = "/var/cache/clightning-replication/plaintext/lightningd.sqlite3"
succeed(f"runuser -u clightning -- ls {replica_db}")
# No other user should be able to read the unencrypted files
machine.fail(f"runuser -u bitcoin -- ls {replica_db}")
# A gocryptfs has been created
succeed("ls /var/backup/clightning/lightningd-db/gocryptfs.conf")
@test("lnd")
def _():
assert_running("lnd")