electrs: use dataDir for storing extra config
This is simpler and more memory-efficient. We've also changed other services to use this appraoch. Also remove unneded `wait_for_unit` in the electrs regtest test.
This commit is contained in:
parent
9bda7305fd
commit
62a2602e78
@ -74,10 +74,8 @@ in {
|
|||||||
> electrs.toml
|
> electrs.toml
|
||||||
'';
|
'';
|
||||||
serviceConfig = nbLib.defaultHardening // {
|
serviceConfig = nbLib.defaultHardening // {
|
||||||
RuntimeDirectory = "electrs";
|
|
||||||
RuntimeDirectoryMode = "700";
|
|
||||||
# electrs only uses the working directory for reading electrs.toml
|
# electrs only uses the working directory for reading electrs.toml
|
||||||
WorkingDirectory = "/run/electrs";
|
WorkingDirectory = cfg.dataDir;
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${config.nix-bitcoin.pkgs.electrs}/bin/electrs -vv \
|
${config.nix-bitcoin.pkgs.electrs}/bin/electrs -vv \
|
||||||
--network=${bitcoind.makeNetworkName "bitcoin" "regtest"} \
|
--network=${bitcoind.makeNetworkName "bitcoin" "regtest"} \
|
||||||
|
@ -375,7 +375,6 @@ def _():
|
|||||||
num_blocks = test_data["num_blocks"]
|
num_blocks = test_data["num_blocks"]
|
||||||
|
|
||||||
if enabled("electrs"):
|
if enabled("electrs"):
|
||||||
machine.wait_for_unit("onion-addresses")
|
|
||||||
machine.wait_until_succeeds(log_has_string("electrs", "serving Electrum RPC"))
|
machine.wait_until_succeeds(log_has_string("electrs", "serving Electrum RPC"))
|
||||||
get_block_height_cmd = (
|
get_block_height_cmd = (
|
||||||
"""echo '{"method": "blockchain.headers.subscribe", "id": 0, "params": []}'"""
|
"""echo '{"method": "blockchain.headers.subscribe", "id": 0, "params": []}'"""
|
||||||
|
Loading…
Reference in New Issue
Block a user