From 15f6bd5b37d97d42885db1f7b251806383782479 Mon Sep 17 00:00:00 2001 From: Riku Date: Fri, 15 Oct 2021 17:19:57 +0200 Subject: [PATCH] fix: properly set custom rpc port for bitcoin-like testnets The options addnode, connect, port, bind, rpcport, rpcbind and wallet only apply to mainnet unless they appear in the appropriate network section. --- build/templates/backend/config/bitcoin_like.conf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build/templates/backend/config/bitcoin_like.conf b/build/templates/backend/config/bitcoin_like.conf index 640aec2f..170b4325 100644 --- a/build/templates/backend/config/bitcoin_like.conf +++ b/build/templates/backend/config/bitcoin_like.conf @@ -5,7 +5,7 @@ server=1 nolisten=1 rpcuser={{.IPC.RPCUser}} rpcpassword={{.IPC.RPCPass}} -rpcport={{.Ports.BackendRPC}} +{{if .Backend.Mainnet}}rpcport={{.Ports.BackendRPC}}{{end}} txindex=1 zmqpubhashtx={{template "IPC.MessageQueueBindingTemplate" .}} @@ -27,4 +27,10 @@ addnode={{$node}} {{- end}} {{- end}} {{- end}} + +{{if not .Backend.Mainnet}} +[test] +rpcport={{.Ports.BackendRPC}} +{{end}} + {{end}}