mirror of
https://github.com/runcitadel/core.git
synced 2024-12-27 23:25:41 +00:00
Merge pull request #15 from pwltr/main
add signet support, fix network section for testnet
This commit is contained in:
commit
4a0e9e9500
|
@ -140,6 +140,13 @@ cat <<EOF > ${BACKUP_STATUS_FILE}
|
|||
EOF
|
||||
exit
|
||||
fi
|
||||
if [[ $BITCOIN_NETWORK == "signet" ]]; then
|
||||
rm -rf "${BACKUP_ROOT}"
|
||||
cat <<EOF > ${BACKUP_STATUS_FILE}
|
||||
{"status": "skipped", "timestamp": $(date +%s000)}
|
||||
EOF
|
||||
exit
|
||||
fi
|
||||
if [[ $BITCOIN_NETWORK == "regtest" ]]; then
|
||||
rm -rf "${BACKUP_ROOT}"
|
||||
cat <<EOF > ${BACKUP_STATUS_FILE}
|
||||
|
|
20
scripts/configure
vendored
20
scripts/configure
vendored
|
@ -75,14 +75,14 @@ if os.path.isfile('../.citadel'):
|
|||
status_dir = os.path.join(CITADEL_ROOT, '..', 'statuses')
|
||||
updating = True
|
||||
|
||||
# Configure for mainnet or testnet or regtest depending
|
||||
# Configure for appropriate network depending
|
||||
# upon the user-supplied value of $NETWORK
|
||||
# If the network is not specified, then use the mainnet
|
||||
BITCOIN_NETWORK=os.environ.get('NETWORK') or 'mainnet'
|
||||
|
||||
# Check if network neither mainnet nor testnet nor regtest
|
||||
if BITCOIN_NETWORK not in ['mainnet', 'testnet', 'regtest']:
|
||||
print('Error: Network must be either mainnet, testnet, or regtest!')
|
||||
if BITCOIN_NETWORK not in ['mainnet', 'testnet', 'signet', 'regtest']:
|
||||
print('Error: Network must be either mainnet, testnet, signet or regtest!')
|
||||
exit(1)
|
||||
|
||||
with open(os.path.join(CITADEL_ROOT, "info.json"), 'r') as file:
|
||||
|
@ -155,8 +155,8 @@ if reconfiguring:
|
|||
|
||||
BITCOIN_NETWORK=os.environ.get('OVERWRITE_NETWORK') or dotenv['BITCOIN_NETWORK']
|
||||
# Check if network neither mainnet nor testnet nor regtest
|
||||
if BITCOIN_NETWORK not in ['mainnet', 'testnet', 'regtest']:
|
||||
print('Error: Network must be either mainnet, testnet, or regtest!')
|
||||
if BITCOIN_NETWORK not in ['mainnet', 'testnet', 'signet', 'regtest']:
|
||||
print('Error: Network must be either mainnet, testnet, signet or regtest!')
|
||||
exit(1)
|
||||
print("Using {} network".format(BITCOIN_NETWORK))
|
||||
print()
|
||||
|
@ -239,6 +239,14 @@ elif BITCOIN_NETWORK == "testnet":
|
|||
NEUTRINO_PEERS='''
|
||||
[neutrino]
|
||||
neutrino.addpeer=testnet1-btcd.zaphq.io
|
||||
neutrino.addpeer=testnet2-btcd.zaphq.io
|
||||
'''
|
||||
elif BITCOIN_NETWORK == "signet":
|
||||
BITCOIN_RPC_PORT=38332
|
||||
BITCOIN_P2P_PORT=38333
|
||||
NEUTRINO_PEERS='''
|
||||
[neutrino]
|
||||
neutrino.addpeer=testnet1-btcd.zaphq.io
|
||||
neutrino.addpeer=testnet2-btcd.zaphq.io
|
||||
'''
|
||||
elif BITCOIN_NETWORK == "regtest":
|
||||
|
@ -251,6 +259,8 @@ else:
|
|||
NETWORK_SECTION=""
|
||||
if BITCOIN_NETWORK != "mainnet":
|
||||
NETWORK_SECTION = "[{}]".format(BITCOIN_NETWORK)
|
||||
if BITCOIN_NETWORK == "testnet":
|
||||
NETWORK_SECTION = "[test]"
|
||||
|
||||
# IP addresses for services
|
||||
NETWORK_IP="10.21.21.0"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
proxy=<tor-proxy-ip>:<tor-proxy-port>
|
||||
listen=1
|
||||
|
||||
# Mainnet/Testnet/regtest
|
||||
# Mainnet/Testnet/Signet/regtest
|
||||
<bitcoin-network>=1
|
||||
|
||||
# Connections
|
||||
|
@ -21,7 +21,6 @@ rpcauth=<bitcoin-rpc-auth>
|
|||
dbcache=200
|
||||
maxmempool=300
|
||||
|
||||
|
||||
# zmq
|
||||
zmqpubrawblock=tcp://0.0.0.0:<bitcoin-zmq-rawblock-port>
|
||||
zmqpubrawtx=tcp://0.0.0.0:<bitcoin-zmq-rawtx-port>
|
||||
|
@ -40,6 +39,8 @@ peerblockfilters=1
|
|||
|
||||
<external-ip>
|
||||
|
||||
# NOTE: The options addnode, connect, port, bind, rpcport, rpcbind and wallet
|
||||
# only apply to mainnet unless they appear in the appropriate section below.
|
||||
<network-section>
|
||||
bind=<bitcoin-ip>
|
||||
port=<bitcoin-p2p-port>
|
||||
|
|
Loading…
Reference in New Issue
Block a user