Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tynes
Last active April 14, 2020 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tynes/7e247232d50dc0fe169405fdddbfe1b4 to your computer and use it in GitHub Desktop.
Save tynes/7e247232d50dc0fe169405fdddbfe1b4 to your computer and use it in GitHub Desktop.
debug hsd script
#!/bin/bash
# Run from the root of the gitrepo
# Starts hsd, can pass debug as arg to run with
# debugger.
DIR="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
ROOTDIR=$(echo $(cd $DIR/.. && pwd))
NODE="$ROOTDIR/bin/node"
if [ "$1" = "debug" ]; then
(
cd $DIR
FILE=$(sed '1d' $NODE)
HSD_NETWORK=regtest HSD_MEMORY=true node debug -e "$FILE"
)
else
$NODE --network regtest --memory true
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment