Skip to content

Commit

Permalink
bitcoin-signet: blocknotify walletnotify
Browse files Browse the repository at this point in the history
  • Loading branch information
RandyMcMillan committed Mar 9, 2023
1 parent ab6bb8d commit dc59839
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 131 deletions.
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ endif
#######################
.PHONY: blocknotify
blocknotify:
bash -c 'install -v $(PWD)/scripts/blocknotify /usr/local/bin/blocknotify'
bash -c 'install -v $(PWD)/bitcoin-signet/blocknotify /usr/local/bin/blocknotify'
#######################
.PHONY: initialize
initialize:## install libs and dependencies
Expand Down
2 changes: 2 additions & 0 deletions bitcoin-signet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ EXPOSE 8332 8333 28332 28333 28334 38332 38333 38334

COPY --from=builder "/tmp/bin" /usr/local/bin

COPY blocknotify /usr/local/bin/blocknotify
COPY walletnotify /usr/local/bin/walletnotify
COPY bitcoin.conf /usr/local/etc/bitcoin.conf
COPY docker-entrypoint.sh /usr/local/bin/entrypoint.sh

Expand Down
2 changes: 2 additions & 0 deletions bitcoin-signet/bitcoin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ txindex=1
server=1
dnsseed=0
blockfilterindex=1
blocknotify=blocknotify
walletnotify=walletnotify
[signet]
rpcbind=0.0.0.0:38332
rpcallowip=0.0.0.0/0
Expand Down
5 changes: 5 additions & 0 deletions bitcoin-signet/blocknotify
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/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
7 changes: 7 additions & 0 deletions bitcoin-signet/walletnotify
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
#This file is executed when sending/recieving/confirming bitcoin
#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
echo %s
echo %w
130 changes: 0 additions & 130 deletions scripts/blocknotify

This file was deleted.

0 comments on commit dc59839

Please sign in to comment.