From 67725037ab389777e9dd2e3527f37019239d1a33 Mon Sep 17 00:00:00 2001 From: JoeGruff Date: Mon, 18 Nov 2024 18:11:29 +0900 Subject: [PATCH] testing/harness/dcr: Update vspd to client/v4.0.1. Use the downloaded vspd and vspadmin binaries. --- dex/testing/dcr/README.md | 2 +- dex/testing/dcr/create-vspd.sh | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/dex/testing/dcr/README.md b/dex/testing/dcr/README.md index ddd0524328..f59b91a7f9 100644 --- a/dex/testing/dcr/README.md +++ b/dex/testing/dcr/README.md @@ -9,7 +9,7 @@ The harness depends on [dcrd](https://github.com/decred/dcrd), [dcrwallet](https ## Using -You must have `dcrd` `dcrwallet` `vspd` and `dcrctl` in `PATH` to use the harness. +You must have `dcrd` `dcrwallet` and `dcrctl` in `PATH` to use the harness. The harness script will create two connected simnet nodes and wallets, and then mine some blocks and send some regular transactions. The result is a set of diff --git a/dex/testing/dcr/create-vspd.sh b/dex/testing/dcr/create-vspd.sh index 6911b3e153..8a56ad38e4 100755 --- a/dex/testing/dcr/create-vspd.sh +++ b/dex/testing/dcr/create-vspd.sh @@ -9,7 +9,13 @@ FEE_XPUB=$3 VSPD_DIR="${NODES_ROOT}/vspd" -git clone -b release-v1.3.2 --depth 1 https://github.com/decred/vspd ${VSPD_DIR} +git clone -b client/v4.0.1 --depth 1 https://github.com/decred/vspd ${VSPD_DIR} + +cd ${VSPD_DIR}/cmd/vspadmin +go build +cd ${VSPD_DIR}/cmd/vspd +go build + DCRD_PORT="${ALPHA_NODE_RPC_PORT}" DCRD_CERT="${NODES_ROOT}/alpha/rpc.cert" @@ -17,6 +23,8 @@ USER="${RPC_USER}" PASS="${RPC_PASS}" WALLET_PORT="${VSPD_WALLET_RPC_PORT}" DCRWALLET_RPC_PORT="${ALPHA_WALLET_RPC_PORT}" +VSPADMIN_BIN="${VSPD_DIR}/cmd/vspadmin/vspadmin" +VSPD_BIN="${VSPD_DIR}/cmd/vspd/vspd" WALLET_CERT="${NODES_ROOT}/vspdwallet/rpc.cert" @@ -43,9 +51,9 @@ tmux new-window -t $TMUX_WIN_ID -n vspd $SHELL tmux send-keys -t $TMUX_WIN_ID "set +o history" C-m tmux send-keys -t $TMUX_WIN_ID "cd ${VSPD_DIR}" C-m -echo "Creating simnet vspd" -tmux send-keys -t $TMUX_WIN_ID "vspd --homedir=${VSPD_DIR} --feexpub=${FEE_XPUB}; tmux wait-for -S vspd" C-m -tmux wait-for vspd +echo "Creating simnet vspd database" +tmux send-keys -t $TMUX_WIN_ID "${VSPADMIN_BIN} createdatabase ${FEE_XPUB} --network=simnet --homedir=${VSPD_DIR}; tmux wait-for -S vspadmin" C-m +tmux wait-for vspadmin echo "Starting simnet vspd" -tmux send-keys -t $TMUX_WIN_ID "vspd --homedir=${VSPD_DIR}; tmux wait-for -S vspd" C-m +tmux send-keys -t $TMUX_WIN_ID "${VSPD_BIN} --homedir=${VSPD_DIR}; tmux wait-for -S vspd" C-m