From 7533f12ef19733036e93923421859d3a8b055c61 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 1 Feb 2021 22:53:03 +0100 Subject: [PATCH] bitcoind, clightning, run-tests: minor refactoring bitcoind: use builtins.toFile clightning: use boolToString run-tests: remove leftover var --- modules/bitcoind.nix | 2 +- modules/clightning.nix | 2 +- test/run-tests.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/bitcoind.nix b/modules/bitcoind.nix index af84cc8..d93bf81 100644 --- a/modules/bitcoind.nix +++ b/modules/bitcoind.nix @@ -7,7 +7,7 @@ let nbLib = config.nix-bitcoin.lib; secretsDir = config.nix-bitcoin.secretsDir; - configFile = pkgs.writeText "bitcoin.conf" '' + configFile = builtins.toFile "bitcoin.conf" '' # We're already logging via journald nodebuglogfile=1 diff --git a/modules/clightning.nix b/modules/clightning.nix index d8838ec..8e52b04 100644 --- a/modules/clightning.nix +++ b/modules/clightning.nix @@ -11,7 +11,7 @@ let network=${network} bitcoin-datadir=${config.services.bitcoind.dataDir} ${optionalString (cfg.proxy != null) "proxy=${cfg.proxy}"} - always-use-proxy=${if cfg.always-use-proxy then "true" else "false"} + always-use-proxy=${boolToString cfg.always-use-proxy} bind-addr=${cfg.address}:${toString cfg.port} bitcoin-rpcconnect=${config.services.bitcoind.rpc.address} bitcoin-rpcport=${toString config.services.bitcoind.rpc.port} diff --git a/test/run-tests.sh b/test/run-tests.sh index 2593a3f..e59cc56 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -172,7 +172,7 @@ doBuild() { # Run the test by building the test derivation buildTest() { - vmTestNixExpr | doBuild $scenario $outLinkArg "$@" - + vmTestNixExpr | doBuild $scenario "$@" - } vmTestNixExpr() {