forked from ActorForth/bch-devsuite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitcoin-cli
executable file
·20 lines (18 loc) · 695 Bytes
/
bitcoin-cli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash
set -e
if [ -f "./.lock" ]; then
if [[ ! -z $1 ]]; then
# This will run the user's command, and also generate 5 blocks
docker-compose exec -T bitcoind-regtest bitcoin-cli $@
## Commented this line out for now: it causes more confusion than it helps
# docker-compose exec bitcoind-regtest bitcoin-cli generate 1
else
# If the user gave no arguments, we'll just generate 10 blocks
echo "Generating 1 block..."
docker-compose exec bitcoind-regtest bitcoin-cli generate 1
echo "Blocks generated."
fi
else
echo "Use this fix script AFTER ./setup and ./services start"
echo "Please note, the wallet should be actively running when you use this script."
fi