-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1771 from CounterpartyXCP/develop
v10.1.2
- Loading branch information
Showing
110 changed files
with
17,948 additions
and
3,176 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
Nice work! 🎉 You're about to create pull request on the Counterparty Core codebase. As part of this process, please be sure to: | ||
You're about to create pull request on the Counterparty Core codebase! 🎉 As part of this process, please be sure to: | ||
|
||
* [ ] Double-check the spelling and grammar of all strings, code comments, etc. | ||
* [ ] Double-check that all code that needs to be is deterministic | ||
* [ ] Add tests to cover any new features | ||
* [ ] Ensure that the test suite passes with the proposed changes | ||
* [ ] Update the project [release notes](release-notes/) | ||
* [ ] Create a corresponding Pull Request in the [official Documentation repository](https://github.com/CounterpartyXCP/Documentation) | ||
* [ ] Update the project documentation as appropriate with a corresponding Pull Request in the [Documentation repository](https://github.com/CounterpartyXCP/Documentation) | ||
|
||
... and be sure to label the Pull Request as a "draft" for as long as it is not ready to be merged into `develop`. |
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
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
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
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ set -e | |
set -x | ||
|
||
if [ -f "./DOCKER_COMPOSE_TEST_LOCK" ]; then | ||
echo "A test is already running. Exiting." | ||
echo "A test is already running or the last one failed. Exiting." | ||
exit 1 | ||
fi | ||
touch "./DOCKER_COMPOSE_TEST_LOCK" | ||
|
@@ -19,7 +19,8 @@ cd counterparty-core | |
VERSION=$(cat docker-compose.yml | grep 'image: counterparty/counterparty:' | awk -F ":" '{print $3}') | ||
|
||
# stop the running containers | ||
docker compose stop | ||
docker compose --profile mainnet stop counterparty-core | ||
docker compose --profile testnet stop counterparty-core-testnet | ||
|
||
# remove counterparty-core container | ||
#docker rm counterparty-core-counterparty-core-1 | ||
|
@@ -31,27 +32,77 @@ docker rmi counterparty/counterparty:$VERSION || true | |
# build the counterparty-core new image | ||
docker build -t counterparty/counterparty:$VERSION . | ||
|
||
# remove the counterparty-core data | ||
# sudo rm -rf ~/.local/share/counterparty-docker-data/counterparty/* | ||
|
||
# re-start containers | ||
BITCOIN_CHAIN=test docker compose up -d | ||
docker compose --profile mainnet up -d | ||
docker compose --profile testnet up -d | ||
|
||
# wait for counterparty-core to be ready | ||
while [ "$(docker compose logs counterparty-core 2>&1 | grep 'Ready for queries')" = "" ]; do | ||
echo "Waiting for counterparty-core to be ready" | ||
echo "Waiting for counterparty-core mainnet to be ready" | ||
sleep 1 | ||
done | ||
|
||
rm -f ../DOCKER_COMPOSE_TEST_LOCK | ||
while [ "$(docker compose logs counterparty-core-testnet 2>&1 | grep 'Ready for queries')" = "" ]; do | ||
echo "Waiting for counterparty-core testnet to be ready" | ||
sleep 1 | ||
done | ||
|
||
|
||
# check running info with API v1 mainnet | ||
response_v1_mainnet=$(curl -X POST http://127.0.0.1:4100/v1/ \ | ||
--user rpc:rpc \ | ||
-H 'Content-Type: application/json; charset=UTF-8'\ | ||
-H 'Accept: application/json, text/javascript' \ | ||
--data-binary '{ "jsonrpc": "2.0", "id": 0, "method": "get_running_info" }' \ | ||
--write-out '%{http_code}' --silent --output /dev/null) | ||
|
||
if [ "$response_v1_mainnet" -ne 200 ]; then | ||
echo "Failed to get_running_info mainnet" | ||
exit 1 | ||
fi | ||
|
||
server_response=$(curl -X POST http://127.0.0.1:14000/api/ \ | ||
# check running info with API v1 testnet | ||
response_v1_testnet=$(curl -X POST http://127.0.0.1:14100/v1/ \ | ||
--user rpc:rpc \ | ||
-H 'Content-Type: application/json; charset=UTF-8'\ | ||
-H 'Accept: application/json, text/javascript' \ | ||
--data-binary '{ "jsonrpc": "2.0", "id": 0, "method": "get_running_info" }' \ | ||
--write-out '%{http_code}' --silent --output /dev/null) | ||
|
||
if [ "$server_response" -ne 200 ]; then | ||
echo "Failed to get_running_info" | ||
if [ "$response_v1_testnet" -ne 200 ]; then | ||
echo "Failed to get_running_info testnet" | ||
exit 1 | ||
fi | ||
|
||
# check running info with API v2 mainnet | ||
response_v2_mainnet=$(curl http://api:[email protected]:4000/v2/ \ | ||
--write-out '%{http_code}' --silent --output /dev/null) | ||
|
||
if [ "$response_v2_mainnet" -ne 200 ]; then | ||
echo "Failed to get API v2 root mainnet" | ||
exit 1 | ||
fi | ||
|
||
# check running info with API v2 testnet | ||
response_v2_testnet=$(curl http://api:[email protected]:14000/v2/ \ | ||
--write-out '%{http_code}' --silent --output /dev/null) | ||
|
||
if [ "$response_v2_mainnet" -ne 200 ]; then | ||
echo "Failed to get API v2 root mainnet" | ||
exit 1 | ||
fi | ||
fi | ||
|
||
|
||
# Run dredd test | ||
dredd | ||
|
||
# Run compare hashes test | ||
. "$HOME/.profile" | ||
cd counterparty-core | ||
hatch env prune | ||
hatch run pytest counterpartycore/test/compare_hashes_test.py --comparehashes | ||
cd .. | ||
|
||
|
||
rm -f ../DOCKER_COMPOSE_TEST_LOCK | ||
exit 0 |
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 |
---|---|---|
|
@@ -2,6 +2,9 @@ env | |
venv | ||
docs/_build/* | ||
target/ | ||
typings/ | ||
pyrightconfig.json | ||
.DS_Store | ||
|
||
profile.txt | ||
|
||
|
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
Oops, something went wrong.