Makefile: Call regtest tasks

This commit is contained in:
Alva Swanson 2023-09-11 20:03:44 +02:00
parent 0c093d509c
commit dbd35e3408
No known key found for this signature in database
GPG key ID: 004760E77F753090

View file

@ -147,35 +147,22 @@ localnet: .localnet
# user, you'll need to manually run each of the targets listed below # user, you'll need to manually run each of the targets listed below
# commands manually in a separate terminal or as background jobs. # commands manually in a separate terminal or as background jobs.
deploy: setup deploy: setup
# ensure localnet is not already deployed ./gradlew :startRegtest
if screen -ls localnet | grep Detached; then false; fi
# create a new screen session named 'localnet'
screen -dmS localnet
# deploy each node in its own named screen window
for target in \
bitcoind \
seednode \
seednode2 \
alice \
bob \
mediator; do \
screen -S localnet -X screen -t $$target; \
screen -S localnet -p $$target -X stuff "make $$target\n"; \
done;
# give bitcoind rpc server time to start # give bitcoind rpc server time to start
sleep 5 sleep 5
# generate a block to ensure Bisq nodes get dao-synced # generate a block to ensure Bisq nodes get dao-synced
make block make block
tail -f .localnet/bitcoind_shell.log \
.localnet/seednode_1_shell.log \
.localnet/seednode_2_shell.log \
.localnet/alice_shell.log \
.localnet/bob_shell.log \
.localnet/mediator_shell.log
# Undeploy a running localnet by killing all Bitcoin and Bisq # Undeploy a running localnet by killing all Bitcoin and Bisq
# node processes, then killing the localnet screen session altogether # node processes, then killing the localnet screen session altogether
undeploy: undeploy:
# kill all Bitcoind and Bisq nodes running in screen windows ./gradlew :stopRegtest
screen -S localnet -X at "#" stuff "^C"
# quit all screen windows which results in killing the session
screen -S localnet -X at "#" kill
# remove dead screens
screen -wipe || true
bitcoind: .localnet bitcoind: .localnet
bitcoind \ bitcoind \