From e2922eb4ce6b820fd1bf698c6aadce5d5f4d27c6 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Thu, 14 Jan 2021 13:24:32 +0100 Subject: [PATCH] move rpc thread count setting to lightning modules --- modules/clightning.nix | 7 ++++++- modules/lnd.nix | 7 ++++++- modules/presets/secure-node.nix | 3 --- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/modules/clightning.nix b/modules/clightning.nix index 04af32b..544782b 100644 --- a/modules/clightning.nix +++ b/modules/clightning.nix @@ -95,7 +95,12 @@ in { }; config = mkIf cfg.enable { - services.bitcoind.enable = true; + services.bitcoind = { + enable = true; + # Increase rpc thread count due to reports that lightning implementations fail + # under high bitcoind rpc load + rpc.threads = 16; + }; environment.systemPackages = [ nbPkgs.clightning (hiPrio cfg.cli) ]; users.users.${cfg.user} = { diff --git a/modules/lnd.nix b/modules/lnd.nix index 5a86290..e8fb9c7 100644 --- a/modules/lnd.nix +++ b/modules/lnd.nix @@ -154,7 +154,12 @@ in { } ]; - services.bitcoind.enable = true; + services.bitcoind = { + enable = true; + # Increase rpc thread count due to reports that lightning implementations fail + # under high bitcoind rpc load + rpc.threads = 16; + }; environment.systemPackages = [ cfg.package (hiPrio cfg.cli) ]; diff --git a/modules/presets/secure-node.nix b/modules/presets/secure-node.nix index 90a16ba..a0472c4 100644 --- a/modules/presets/secure-node.nix +++ b/modules/presets/secure-node.nix @@ -42,9 +42,6 @@ in { discover = false; addresstype = "bech32"; dbCache = 1000; - # higher rpcthread count due to reports that lightning implementations fail - # under high bitcoind rpc load - rpc.threads = 16; }; services.liquidd = {