-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
183 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FROM kylemanna/bitcoind:latest | ||
CMD ["/usr/local/bin/bitcoind", "-printtoconsole", "-regtest", "-debug", "-server", "-listen", "-port=31591", "-connect=localhost:31592", "-rpcbind=0.0.0.0:32591", "-rpcallowip=0.0.0.0/0", "-rpcuser=admin", "-rpcpassword=admin" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FROM kylemanna/bitcoind:latest | ||
CMD ["/usr/local/bin/bitcoind", "-printtoconsole", "-regtest", "-debug", "-server", "-listen", "-port=31592", "-connect=localhost:31591", "-rpcbind=0.0.0.0:32592", "-rpcallowip=0.0.0.0/0", "-rpcuser=admin", "-rpcpassword=admin" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
sudo docker run -d --name bitcoind01 -p 31591:31591 --entrypoint "/usr/local/bin/bitcoind" kylemanna/bitcoind:latest -printtoconsole -regtest -debug -server -listen -port=31591 -connect=localhost:31592 -rpcbind=0.0.0.0:32591 -rpcallowip=0.0.0.0/0 -rpcuser=admin -rpcpassword=admin | ||
sudo docker run -d --name bitcoind02 -p 31592:31592 --entrypoint "/usr/local/bin/bitcoind" kylemanna/bitcoind:latest -printtoconsole -regtest -debug -server -listen -port=31592 -connect=localhost:31591 -rpcbind=0.0.0.0:32592 -rpcallowip=0.0.0.0/0 -rpcuser=admin -rpcpassword=admin | ||
|
||
while ! docker ps --format "{{.Names}}" | grep -wq bitcoind01; do | ||
echo "Waiting for container bitcoind01 to start..." | ||
sleep 5 # Wait for 5 seconds before checking again | ||
done | ||
|
||
while ! docker ps --format "{{.Names}}" | grep -wq bitcoind02; do | ||
echo "Waiting for container bitcoind02 to start..." | ||
sleep 5 # Wait for 5 seconds before checking again | ||
done | ||
echo "Containers are running." | ||
docker network ls | ||
sudo lsof -i:31591 -sTCP:LISTEN | ||
|
||
echo Test bitcoin node 1 | ||
curl -s -u admin:admin --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getblockchaininfo","params":[]}' -H 'content-type:text/plain;' http://bitcoind01:32591 | ||
echo Test bitcoin node 2 | ||
curl -s -u admin:admin --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getblockchaininfo","params":[]}' -H 'content-type:text/plain;' http://bitcoind01:32592 | ||
|
||
(cd mining-integration-tests && node generateBtcBlocks.js || exit 1) | ||
|