Skip to content

Commit

Permalink
add testnet support
Browse files Browse the repository at this point in the history
  • Loading branch information
Retropex committed Aug 27, 2024
1 parent 4e6af47 commit e461179
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions assets/compat/bitcoin.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
## RPC
{{#IF rpc.enable
{{#IF advanced.pruning.mode = "automatic"
{{#IF !advanced.testnet
rpcbind=127.0.0.1:18332
rpcallowip=127.0.0.1/32
}}
}}
{{#IF advanced.pruning.mode != "automatic"
{{#IF !advanced.testnet
rpcbind=0.0.0.0:8332
rpcallowip=0.0.0.0/0
}}
}}
}}
rpcuser={{rpc.username}}
rpcpassword={{rpc.password}}
{{#FOREACH rpc.advanced.auth
Expand Down Expand Up @@ -41,8 +45,10 @@ mempoolexpiry={{advanced.mempool.mempoolexpiry}}
## PEERS
{{#IF advanced.peers.listen
listen=1
{{#IF !advanced.testnet
bind=0.0.0.0:8333
}}
}}
{{#IF !advanced.peers.listen
listen=0
}}
Expand Down Expand Up @@ -203,4 +209,8 @@ acceptnonstddatacarrier=1
}}
{{#IF !blkconstr.acceptnonstddatacarrier
acceptnonstddatacarrier=0
}}

{{#IF advanced.testnet
testnet=1
}}
6 changes: 6 additions & 0 deletions scripts/services/getConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e461179

Please sign in to comment.