From f0c063520d40de72c6afa5353de7d67bed0110fd Mon Sep 17 00:00:00 2001 From: Neal Date: Tue, 3 May 2022 14:03:15 -0400 Subject: [PATCH] chore: update bitcoind, default to bech32 --- lib/blockchain/bitcoin.js | 9 ++++++++- lib/blockchain/common.js | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/blockchain/bitcoin.js b/lib/blockchain/bitcoin.js index 103ebd79..f1f9d951 100644 --- a/lib/blockchain/bitcoin.js +++ b/lib/blockchain/bitcoin.js @@ -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 diff --git a/lib/blockchain/common.js b/lib/blockchain/common.js index 96524f34..da059ba0 100644 --- a/lib/blockchain/common.js +++ b/lib/blockchain/common.js @@ -23,8 +23,8 @@ module.exports = { const BINARIES = { BTC: { - url: 'https://bitcoincore.org/bin/bitcoin-core-22.0/bitcoin-22.0-x86_64-linux-gnu.tar.gz', - dir: 'bitcoin-22.0/bin' + url: 'https://bitcoincore.org/bin/bitcoin-core-23.0/bitcoin-23.0-x86_64-linux-gnu.tar.gz', + dir: 'bitcoin-23.0/bin' }, ETH: { url: 'https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.10.17-25c9b49f.tar.gz',