diff --git a/btcp_store_demo.sh b/btcp_store_demo.sh index 7c50e0e..657c389 100755 --- a/btcp_store_demo.sh +++ b/btcp_store_demo.sh @@ -69,6 +69,10 @@ fi # Build Bitcoin Private ./BitcoinPrivate/btcputil/build.sh -j$(nproc) +} + +init_btcprivate_dotdir() { + # Make .btcprivate dir (btcpd hasn't been run) if [ ! -e ~/.btcprivate/ ] then @@ -81,16 +85,15 @@ then touch ~/.btcprivate/btcprivate.conf fi +cd ~/.btcprivate + +# Download + decompress blockchain.tar.gz (chainstate) to quickly sync past block 300,000 fetch_btcp_blockchain } -# Download + decompress blockchain.tar.gz (chainstate) to quickly sync past block 300,000 - fetch_btcp_blockchain() { -cd ~/.btcprivate - wget https://storage.googleapis.com/btcpblockchain/blockchain.tar.gz tar -zxvf blockchain.tar.gz echo "Downloading and extracting blockchain files - Done." @@ -220,6 +223,7 @@ case "$response" in echo "Neither; Skipped." esac +init_btcprivate_dotdir install_nvm_npm