Skip to content

Commit

Permalink
bitcoin-signet/blocknotify: while loop
Browse files Browse the repository at this point in the history
  • Loading branch information
RandyMcMillan committed Mar 17, 2023
1 parent bddba41 commit bfb9213
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions bitcoin-signet/blocknotify
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/bash
+#This file is executed when a new block is recieved
+#It can be used to automate things in the container
ADDRESS=tb1q550ph67a0qztgg7zx5lxnuj6qj20wxav2mx47k
play-getcoins -a "$(play-getcoins -a $ADDRESS -r true)" > /dev/null 2>&1
#This file is executed when a new block is recieved
#It can be used to automate things in the container
PLAY_BITCOIN_ID=$(play-bitcoin id);
while [ ! -z "$PLAY_BITCOIN" ]; do
ADDRESS=tb1q550ph67a0qztgg7zx5lxnuj6qj20wxav2mx47k && \
play-getcoins -a "$(play-getcoins -a $ADDRESS -r true)" > /dev/null 2>&1;
PLAY_BITCOIN_ID=$(play-bitcoin id);
echo $PLAY_BITCOIN_ID
done

0 comments on commit bfb9213

Please sign in to comment.