decred.org/dcrdex@v1.0.3/dex/testing/dcr/create-vspd.sh (about)

     1  #!/usr/bin/env bash
     2  # Script for creating dcr vspd, dcr harness and wallets should be running before executing.
     3  set -e
     4  
     5  # The following are required script arguments
     6  TMUX_WIN_ID=$1
     7  PORT=$2
     8  FEE_XPUB=$3
     9  
    10  VSPD_DIR="${NODES_ROOT}/vspd"
    11  
    12  git clone -b release-v1.3.2 --depth 1 https://github.com/decred/vspd ${VSPD_DIR}
    13  
    14  DCRD_PORT="${ALPHA_NODE_RPC_PORT}"
    15  DCRD_CERT="${NODES_ROOT}/alpha/rpc.cert"
    16  USER="${RPC_USER}"
    17  PASS="${RPC_PASS}"
    18  WALLET_PORT="${VSPD_WALLET_RPC_PORT}"
    19  DCRWALLET_RPC_PORT="${ALPHA_WALLET_RPC_PORT}"
    20  
    21  WALLET_CERT="${NODES_ROOT}/vspdwallet/rpc.cert"
    22  
    23  # vspd config
    24  cat > "${VSPD_DIR}/vspd.conf" <<EOF
    25  listen=127.0.0.1:${PORT}
    26  network=simnet
    27  vspfee=2.0
    28  dcrdhost=127.0.0.1:${DCRD_PORT}
    29  dcrduser=${USER}
    30  dcrdpass=${PASS}
    31  dcrdcert=${DCRD_CERT}
    32  wallethost=127.0.0.1:${WALLET_PORT}
    33  walletuser=${USER}
    34  walletpass=${PASS}
    35  walletcert=${WALLET_CERT}
    36  supportemail=www.support.com
    37  adminpass=${PASS}
    38  loglevel=trace
    39  EOF
    40  
    41  # start the vspd
    42  tmux new-window -t $TMUX_WIN_ID -n vspd $SHELL
    43  tmux send-keys -t $TMUX_WIN_ID "set +o history" C-m
    44  tmux send-keys -t $TMUX_WIN_ID "cd ${VSPD_DIR}" C-m
    45  
    46  echo "Creating simnet vspd"
    47  tmux send-keys -t $TMUX_WIN_ID "vspd --homedir=${VSPD_DIR} --feexpub=${FEE_XPUB}; tmux wait-for -S vspd" C-m
    48  tmux wait-for vspd
    49  
    50  echo "Starting simnet vspd"
    51  tmux send-keys -t $TMUX_WIN_ID "vspd --homedir=${VSPD_DIR}; tmux wait-for -S vspd" C-m