From a2835a8df2e55bfe0a2cc896edbcccc9e200631f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Le=CC=81o=20Haf?= Date: Tue, 27 Aug 2024 20:26:42 +0200 Subject: [PATCH] add `testnet` support --- assets/compat/bitcoin.conf.template | 6 ++++++ scripts/services/getConfig.ts | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/assets/compat/bitcoin.conf.template b/assets/compat/bitcoin.conf.template index 0e21c21f..b50734a7 100644 --- a/assets/compat/bitcoin.conf.template +++ b/assets/compat/bitcoin.conf.template @@ -2,6 +2,12 @@ ## bitcoin.conf configuration file. Lines beginning with # are comments. ## +{{#IF advanced.testnet +chain=test +port=8333 +rpcport=8332 +}} + ## RPC {{#IF rpc.enable {{#IF advanced.pruning.mode = "automatic" diff --git a/scripts/services/getConfig.ts b/scripts/services/getConfig.ts index f89ce9a0..3be9ac0c 100644 --- a/scripts/services/getConfig.ts +++ b/scripts/services/getConfig.ts @@ -518,6 +518,12 @@ export const getConfig: T.ExpectedExports.getConfig = async (effects) => { }, }, }, + testnet: { + type: "boolean", + name: "Testnet (EXPERIMENTAL)", + description: "Use testnet instead of mainnet", + default: false, + }, }, }, })(effects);