diff --git a/build.sh b/build.sh index 8948a75..7052426 100755 --- a/build.sh +++ b/build.sh @@ -2,15 +2,15 @@ TRACING=1 -# CYPHERNODE VERSION "v0.6.0-dev", dev over v0.6.0 -CONF_VERSION="v0.6.0-dev-local" -GATEKEEPER_VERSION="v0.6.0-dev-local" -TOR_VERSION="v0.6.0-dev-local" -PROXY_VERSION="v0.6.0-dev-local" -NOTIFIER_VERSION="v0.6.0-dev-local" -PROXYCRON_VERSION="v0.6.0-dev-local" -OTSCLIENT_VERSION="v0.6.0-dev-local" -PYCOIN_VERSION="v0.6.0-dev-local" +# CYPHERNODE VERSION "v0.7.0" +CONF_VERSION="v0.7.0-local" +GATEKEEPER_VERSION="v0.7.0-local" +TOR_VERSION="v0.7.0-local" +PROXY_VERSION="v0.7.0-local" +NOTIFIER_VERSION="v0.7.0-local" +PROXYCRON_VERSION="v0.7.0-local" +OTSCLIENT_VERSION="v0.7.0-local" +PYCOIN_VERSION="v0.7.0-local" trace() { diff --git a/cyphernodeconf_docker/build.sh b/cyphernodeconf_docker/build.sh deleted file mode 100755 index e933af0..0000000 --- a/cyphernodeconf_docker/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -VERSION=v0.6.0-dev - -docker build . -t cyphernode/cyphernodeconf:${VERSION} diff --git a/cyphernodeconf_docker/run.sh b/cyphernodeconf_docker/run.sh deleted file mode 100755 index fa84318..0000000 --- a/cyphernodeconf_docker/run.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -export SETUP_DIR=$(pwd)/../dist -export DEFAULT_USER=$USER -export DEFAULT_CERT_HOSTNAME=disk0book.local -export PROXYCRON_VERSION=v0.6.0-dev -export PYCOIN_VERSION=v0.6.0-dev -export SETUP_VERSION=v0.6.0-dev -export BITCOIN_VERSION=v0.21.0 -export LIGHTNING_VERSION=v0.9.1 -export DEFAULT_DATADIR_BASE=$HOME -export GATEKEEPER_VERSION=v0.6.0-dev -export TOR_VERSION=v0.6.0-dev -export PROXY_VERSION=v0.6.0-dev -export OTSCLIENT_VERSION=v0.6.0-dev -export NOTIFIER_VERSION=v0.6.0-dev -export EDITOR=/usr/bin/nano -export TRAEFIK_VERSION="v1.7.9-alpine" -export MOSQUITTO_VERSION="1.6" - -user=$(id -u):$(id -g) - -if [ "${MODE}" = 'docker' ]; then - docker build . -t cyphernodeconf:local - docker run -v $(pwd)/testinst:/data \ - -e DEFAULT_USER=jash \ - -e DEFAULT_DATADIR_BASE=$HOME \ - -e SETUP_DIR=$SETUP_DIR \ - -e DEFAULT_CERT_HOSTNAME=$(hostname) \ - -e GATEKEEPER_VERSION=$GATEKEEPER_VERSION \ - -e TRAEFIK_VERSION=$TRAEFIK_VERSION \ - -e MOSQUITTO_VERSION=$MOSQUITTO_VERSION \ - -e TOR_VERSION=$TOR_VERSION \ - -e PROXY_VERSION=$PROXY_VERSION \ - -e NOTIFIER_VERSION=$NOTIFIER_VERSION \ - -e PROXYCRON_VERSION=$PROXYCRON_VERSION \ - -e OTSCLIENT_VERSION=$OTSCLIENT_VERSION \ - -e PYCOIN_VERSION=$PYCOIN_VERSION \ - -e BITCOIN_VERSION=$BITCOIN_VERSION \ - -e LIGHTNING_VERSION=$LIGHTNING_VERSION \ - -e SETUP_VERSION=$SETUP_VERSION \ - -e DEFAULT_USER=$DEFAULT_USER \ - --log-driver=none \ - --network none \ - --rm -it cyphernodeconf:local $user node index.js $@ -else - /usr/local/bin/node index.js $@ -fi diff --git a/dist/setup.sh b/dist/setup.sh index c457a07..0338da0 100755 --- a/dist/setup.sh +++ b/dist/setup.sh @@ -849,17 +849,17 @@ ALWAYSYES=0 SUDO_REQUIRED=0 AUTOSTART=0 -# CYPHERNODE VERSION "v0.6.0-dev", dev over v0.6.0 -SETUP_VERSION="v0.6.0-dev" -CONF_VERSION="v0.6.0-dev" -GATEKEEPER_VERSION="v0.6.0-dev" -TOR_VERSION="v0.6.0-dev" -PROXY_VERSION="v0.6.0-dev" -NOTIFIER_VERSION="v0.6.0-dev" -PROXYCRON_VERSION="v0.6.0-dev" -OTSCLIENT_VERSION="v0.6.0-dev" -PYCOIN_VERSION="v0.6.0-dev" -CYPHERAPPS_VERSION="dev" +# CYPHERNODE VERSION "v0.7.0" +SETUP_VERSION="v0.7.0" +CONF_VERSION="v0.7.0" +GATEKEEPER_VERSION="v0.7.0" +TOR_VERSION="v0.7.0" +PROXY_VERSION="v0.7.0" +NOTIFIER_VERSION="v0.7.0" +PROXYCRON_VERSION="v0.7.0" +OTSCLIENT_VERSION="v0.7.0" +PYCOIN_VERSION="v0.7.0" +CYPHERAPPS_VERSION="v0.7.0" BITCOIN_VERSION="v0.21.1" LIGHTNING_VERSION="v0.10.0" TRAEFIK_VERSION="v1.7.9-alpine" diff --git a/docker-build.sh b/docker-build.sh index 181f0e8..83d53cf 100755 --- a/docker-build.sh +++ b/docker-build.sh @@ -66,8 +66,8 @@ aarch64_docker="arm64" arch_docker=${x86_docker} v1="v0" -v2="v0.6" -v3="v0.6.0" +v2="v0.7" +v3="v0.7.0" echo "\nBuilding Cyphernode Core containers\n" echo "arch_docker=$arch_docker\n" diff --git a/proxy_docker/app/script/batching.sh b/proxy_docker/app/script/batching.sh index fa06d90..79f9242 100644 --- a/proxy_docker/app/script/batching.sh +++ b/proxy_docker/app/script/batching.sh @@ -264,7 +264,8 @@ removefrombatch() { trace "[removefrombatch] id missing" response='{"result":null,"error":{"code":-32700,"message":"outputId is required","data":'${request}'}}' else - batcher_id=$(sql "SELECT batcher_id FROM recipient WHERE id=${id}") + # We don't want to remove an already spent output + batcher_id=$(sql "SELECT batcher_id FROM recipient WHERE id=${id} AND tx_id IS NULL") returncode=$? trace_rc ${returncode} diff --git a/proxy_docker/app/script/watchrequest.sh b/proxy_docker/app/script/watchrequest.sh index 29cd49d..e4aee18 100644 --- a/proxy_docker/app/script/watchrequest.sh +++ b/proxy_docker/app/script/watchrequest.sh @@ -342,6 +342,8 @@ watchtxidrequest() { trace "[watchtxidrequest] cbxconf_url=${cbxconf_url}" local nbxconf=$(echo "${request}" | jq ".nbxconf") trace "[watchtxidrequest] nbxconf=${nbxconf}" + local cb1cond + local cbxcond local inserted local id_inserted local result @@ -353,7 +355,17 @@ watchtxidrequest() { if [ "${returncode}" -eq 0 ]; then inserted=1 - id_inserted=$(sql "SELECT id FROM watching_by_txid WHERE txid=${txid} AND callback1conf=${cb1conf_url} AND callbackxconf=${cbxconf_url}") + if [ "${cb1conf_url}" = "null" ]; then + cb1cond=" IS NULL" + else + cb1cond="=${cb1conf_url}" + fi + if [ "${cbxconf_url}" = "null" ]; then + cbxcond=" IS NULL" + else + cbxcond="=${cbxconf_url}" + fi + id_inserted=$(sql "SELECT id FROM watching_by_txid WHERE txid=${txid} AND callback1conf${cb1cond} AND callbackxconf${cbxcond}") trace "[watchtxidrequest] id_inserted: ${id_inserted}" else inserted=0