chore: update bitcoind, default to bech32

This commit is contained in:
Neal 2022-05-03 14:03:15 -04:00
parent e90904537d
commit f0c063520d
2 changed files with 10 additions and 3 deletions

View file

@ -27,6 +27,13 @@ function updateCore (coinRec, isCurrentlyRunning) {
common.es(`rm -r /tmp/${coinRec.dir.replace('/bin', '')}`)
common.es(`rm /tmp/bitcoin.tar.gz`)
if (common.es(`grep "addresstype=p2sh-segwit" /mnt/blockchains/bitcoin/bitcoin.conf || true`)) {
common.logger.info(`Enabling bech32 receiving addresses in config file..`)
common.es(`sed -i 's/addresstype=p2sh-segwit/addresstype=bech32/g' /mnt/blockchains/bitcoin/bitcoin.conf`)
} else {
common.logger.info(`bech32 receiving addresses already defined, skipping...`)
}
if (common.es(`grep "changetype=" /mnt/blockchains/bitcoin/bitcoin.conf || true`)) {
common.logger.info(`changetype already defined, skipping...`)
} else {
@ -58,7 +65,7 @@ connections=40
keypool=10000
prune=4000
daemon=0
addresstype=p2sh-segwit
addresstype=bech32
changetype=bech32
walletrbf=1
bind=0.0.0.0:8332