Skip to content

Commit

Permalink
adapt tools to remote RPC connection
Browse files Browse the repository at this point in the history
  • Loading branch information
openoms committed May 8, 2021
1 parent 4a37336 commit 1981e1d
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions scripts/menu.tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ function getQRstring {
openMenuIfCancelled $?
}

isLocalBitcoinCLI=$(sudo -u bitcoin bitcoin-cli -version|grep -c "Bitcoin Core RPC client")

# BASIC MENU INFO
HEIGHT=13
HEIGHT=11
WIDTH=55
CHOICE_HEIGHT=7
CHOICE_HEIGHT=5
TITLE="Tools"
MENU=""
OPTIONS=()
Expand All @@ -67,12 +69,20 @@ fi
OPTIONS+=(
QR "Display a QR code from any text"
CUSTOMRPC "Run a custom bitcoin RPC with curl"
SCANJM "Scan blocks for JoinMarket coinjoins"
CHECKTXN "CLI transaction explorer"
SCANJM "Scan blocks for JoinMarket coinjoins")
if [ $isLocalBitcoinCLI -gt 0 ];then
OPTIONS+=(
CHECKTXN "CLI transaction explorer")
HEIGHT=$((HEIGHT+1))
CHOICE_HEIGHT=$((CHOICE_HEIGHT+1))
fi
OPTIONS+=(
BOLTZMANN "Analyze the entropy of a transaction")
if [ "${runningEnv}" != mynode ]; then
OPTIONS+=(
PASSWORD "Change the ssh password")
HEIGHT=$((HEIGHT+1))
CHOICE_HEIGHT=$((CHOICE_HEIGHT+1))
fi
OPTIONS+=(
LOGS "Show the bitcoind logs on $network")
Expand Down Expand Up @@ -143,7 +153,7 @@ case $CHOICE in
echo "Press ENTER to return to the menu..."
read key;;
SCANJM)
BLOCKHEIGHT=$(sudo -u bitcoin bitcoin-cli getblockchaininfo\
BLOCKHEIGHT=$(customRPC "" "getblockchaininfo" ""\
|grep blocks|awk '{print $2}'|cut -d, -f1)
dialog_inputbox "snicker-finder.py" \
"\nUsing: https://github.com/JoinMarket-Org/joinmarket-clientserver/blob/\
Expand Down

0 comments on commit 1981e1d

Please sign in to comment.