Last active
April 14, 2020 03:03
-
-
Save tynes/7e247232d50dc0fe169405fdddbfe1b4 to your computer and use it in GitHub Desktop.
debug hsd script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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