From e99937991cca3db105f01b10154965d940be4967 Mon Sep 17 00:00:00 2001 From: Otto Sabart Date: Fri, 3 Mar 2023 21:00:00 +0100 Subject: [PATCH] trustedcoin: update to v0.6.1 --- modules/clightning-plugins/trustedcoin.nix | 7 ++----- modules/clightning.nix | 13 ++----------- pkgs/trustedcoin/default.nix | 6 +++--- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/modules/clightning-plugins/trustedcoin.nix b/modules/clightning-plugins/trustedcoin.nix index 6199c61..a4f330a 100644 --- a/modules/clightning-plugins/trustedcoin.nix +++ b/modules/clightning-plugins/trustedcoin.nix @@ -9,17 +9,14 @@ let cfg = config.services.clightning.plugins.trustedcoin; in type = types.package; default = config.nix-bitcoin.pkgs.trustedcoin; defaultText = "config.nix-bitcoin.pkgs.trustedcoin"; - description = mdDoc '' - The package providing trustedcoin binaries. Trustedcoin will try to - use a bitcoind as a trusted source for getting block data. If this - fails, it will use a trustedcoin providers instead. - ''; + description = mdDoc "The package providing trustedcoin binaries."; }; }; config = mkIf cfg.enable { services.clightning.extraConfig = '' plugin=${cfg.package}/bin/trustedcoin + disable-plugin=bcli ''; }; } diff --git a/modules/clightning.nix b/modules/clightning.nix index bf9b098..cda95e4 100644 --- a/modules/clightning.nix +++ b/modules/clightning.nix @@ -30,15 +30,6 @@ let This also disables all DNS lookups, to avoid leaking address information. ''; }; - useBcli = mkOption { - type = types.bool; - default = true; - description = mdDoc '' - If clightning should use the bitcoind as a main source for getting - on-chain block data. Disable this to use a trustedcoin provider (the - trustedcoin plugin will be automatically enabled). - ''; - }; dataDir = mkOption { type = types.path; default = "/var/lib/clightning"; @@ -116,8 +107,7 @@ let network = bitcoind.makeNetworkName "bitcoin" "regtest"; configFile = pkgs.writeText "config" '' network=${network} - ${optionalString (!cfg.useBcli) "disable-plugin=bcli"} - ${optionalString (cfg.useBcli) "bitcoin-datadir=${bitcoind.dataDir}"} + ${optionalString (!cfg.plugins.trustedcoin.enable) "bitcoin-datadir=${bitcoind.dataDir}"} ${optionalString (cfg.proxy != null) "proxy=${cfg.proxy}"} always-use-proxy=${boolToString cfg.always-use-proxy} bind-addr=${cfg.address}:${toString cfg.port} @@ -173,6 +163,7 @@ in { { cat ${configFile} echo "bitcoin-rpcpassword=$(cat ${config.nix-bitcoin.secretsDir}/bitcoin-rpcpassword-public)" + ${optionalString (cfg.getPublicAddressCmd != "") '' echo "announce-addr=$(${cfg.getPublicAddressCmd}):${toString publicPort}" ''} diff --git a/pkgs/trustedcoin/default.nix b/pkgs/trustedcoin/default.nix index 4b4cb64..47c93f6 100644 --- a/pkgs/trustedcoin/default.nix +++ b/pkgs/trustedcoin/default.nix @@ -2,15 +2,15 @@ buildGoModule rec { pname = "trustedcoin"; - version = "0.5.2"; + version = "0.6.1"; src = fetchFromGitHub { owner = "nbd-wtf"; repo = pname; rev = "v${version}"; - sha256 = "sha256-s8zgY+TDABK96BehY+SVl86wCMd+e8BKdxw0kGV1jAI="; + sha256 = "sha256-UNQjxhAT0mK1In7vUtIoMoMNBV+0wkrwbDmm7m+0R3o="; }; - vendorSha256 = "sha256-wpK5SW9nOMO/e4DoEk8LRxLykxYt06LoBBxjeEujOiU="; + vendorSha256 = "sha256-xvkK9rMQlXTnNyOMd79qxVSvhgPobcBk9cq4/YWbupY="; subPackages = [ "." ];