liquid: fix bitcoin rpc settings

- Remove redundant option mainchainrpchost.
  This option is already provided by bitcoind.
- Set a working default for rpcport and rpcuser.
  Enables use without secure-node.
This commit is contained in:
Erik Arvstedt 2020-09-28 13:09:05 +02:00
parent c07e767889
commit 480d0d3959
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
3 changed files with 3 additions and 15 deletions

View File

@ -30,7 +30,9 @@ let
${lib.concatMapStrings (rpcallowip: "rpcallowip=${rpcallowip}\n") cfg.rpcallowip}
${optionalString (cfg.rpcuser != null) "rpcuser=${cfg.rpcuser}"}
${optionalString (cfg.rpcpassword != null) "rpcpassword=${cfg.rpcpassword}"}
${optionalString (cfg.mainchainrpchost != null) "mainchainrpchost=${cfg.mainchainrpchost}"}
mainchainrpchost=${builtins.elemAt config.services.bitcoind.rpcbind 0}
mainchainrpcport=${toString config.services.bitcoind.rpc.port}
mainchainrpcuser=${config.services.bitcoind.rpc.users.public.name}
# Extra config options (from liquidd nixos service)
${cfg.extraConfig}
@ -146,15 +148,6 @@ in {
default = null;
description = "Password for JSON-RPC connections";
};
mainchainrpchost = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
The address which the daemon will try to connect to the trusted
mainchain daemon to validate peg-ins.
'';
};
testnet = mkOption {
type = types.bool;
default = false;

View File

@ -295,7 +295,6 @@ in {
rpcallowip = [
"127.0.0.1"
] ++ map (n: "${netns.${n}.address}") netns.liquidd.availableNetns;
mainchainrpchost = netns.bitcoind.address;
cliExec = mkCliExec "liquidd";
};

View File

@ -102,10 +102,6 @@ in {
services.liquidd = {
rpcuser = "liquidrpc";
prune = 1000;
extraConfig = ''
mainchainrpcuser=${config.services.bitcoind.rpc.users.public.name}
mainchainrpcport=8332
'';
validatepegin = true;
listen = true;
proxy = cfg.tor.client.socksListenAddress;