From a8a24571d4d435df60c680cee61d8cf658833432 Mon Sep 17 00:00:00 2001 From: Aaron Blankstein Date: Tue, 20 Oct 2020 07:58:09 -0500 Subject: [PATCH] add Dockerfile that can run net-test scripts, add 500 logging to faucet.sh, add fallback fee --- .../bitcoin-int-tests/Dockerfile.net-tests | 21 +++++++++++++++++++ net-test/bin/faucet.sh | 1 + net-test/bin/start.sh | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .github/actions/bitcoin-int-tests/Dockerfile.net-tests diff --git a/.github/actions/bitcoin-int-tests/Dockerfile.net-tests b/.github/actions/bitcoin-int-tests/Dockerfile.net-tests new file mode 100644 index 0000000000..da9c6d43fc --- /dev/null +++ b/.github/actions/bitcoin-int-tests/Dockerfile.net-tests @@ -0,0 +1,21 @@ +FROM rust:buster + +WORKDIR /src + +COPY . . + +RUN cd / && wget https://bitcoin.org/bin/bitcoin-core-0.20.0/bitcoin-0.20.0-x86_64-linux-gnu.tar.gz +RUN cd / && tar -xvzf bitcoin-0.20.0-x86_64-linux-gnu.tar.gz + +RUN ln -s /bitcoin-0.20.0/bin/bitcoind /bin/ +RUN ln -s /bitcoin-0.20.0/bin/bitcoin-cli /bin/ + +RUN apt-get update +RUN apt-get install -y jq screen net-tools ncat + +RUN cargo build --workspace + +ENV PATH="/src/target/debug:/src/net-test/bin:${PATH}" + +WORKDIR /src/net-test/bin +RUN bash diff --git a/net-test/bin/faucet.sh b/net-test/bin/faucet.sh index fc8b9c77e1..beb9303281 100755 --- a/net-test/bin/faucet.sh +++ b/net-test/bin/faucet.sh @@ -43,6 +43,7 @@ http_401() { http_500() { local ERR="$1" local ERR_LEN=${#ERR} + log "500 error: ${ERR}" printf "HTTP/1.0 500 Internal Server error\r\nContent-Length: $ERR_LEN\r\nContent-Type: text/plain\r\n\r\n$ERR" } diff --git a/net-test/bin/start.sh b/net-test/bin/start.sh index 629326895b..6c912c77ee 100755 --- a/net-test/bin/start.sh +++ b/net-test/bin/start.sh @@ -61,7 +61,7 @@ start_bitcoind() { logln "ok" log "Starting bitcoind..." - bitcoind -conf="$BITCOIN_CONF" >"$BITCOIN_LOGFILE" 2>&1 & + bitcoind -fallbackfee=0.0002 -conf="$BITCOIN_CONF" >"$BITCOIN_LOGFILE" 2>&1 & local BITCOIN_PID=$! logln "PID $BITCOIN_PID"