2020-08-10 23:00:32 +02:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
2020-10-08 16:35:00 -07:00
|
|
|
echo "Starting bitcoin node."
|
2021-02-12 09:53:37 -08:00
|
|
|
/root/bitcoind -regtest -server -daemon -fallbackfee=0.0002 -rpcuser=$BDK_RPC_USER -rpcpassword=$BDK_RPC_PASS -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0 -blockfilterindex=1 -peerblockfilters=1
|
2020-08-10 23:00:32 +02:00
|
|
|
|
2020-10-08 16:35:00 -07:00
|
|
|
echo "Waiting for bitcoin node."
|
2021-02-12 09:53:37 -08:00
|
|
|
until /root/bitcoin-cli -regtest -rpcuser=$BDK_RPC_USER -rpcpassword=$BDK_RPC_PASS getblockchaininfo; do
|
2020-08-10 23:00:32 +02:00
|
|
|
sleep 1
|
|
|
|
done
|
2021-02-12 09:53:37 -08:00
|
|
|
/root/bitcoin-cli -regtest -rpcuser=$BDK_RPC_USER -rpcpassword=$BDK_RPC_PASS createwallet $BDK_RPC_WALLET
|
2020-10-08 16:35:00 -07:00
|
|
|
echo "Generating 150 bitcoin blocks."
|
2021-02-12 09:53:37 -08:00
|
|
|
ADDR=$(/root/bitcoin-cli -regtest -rpcuser=$BDK_RPC_USER -rpcpassword=$BDK_RPC_PASS -rpcwallet=$BDK_RPC_WALLET getnewaddress)
|
|
|
|
/root/bitcoin-cli -regtest -rpcuser=$BDK_RPC_USER -rpcpassword=$BDK_RPC_PASS generatetoaddress 150 $ADDR
|