Created
August 25, 2023 17:08
-
-
Save csknk/a8761a820439b37ef9ed818e32e04f23 to your computer and use it in GitHub Desktop.
Revisions
-
csknk created this gist
Aug 25, 2023 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ #!/usr/bin/env bash # Basic script to run against Bitcoin bitcoind server on LAN # Ref: Bitcoin Core getchaintips RPC command: https://bitcoincore.org/en/doc/0.21.0/rpc/blockchain/getchaintips set -eou pipefail IFS=$'\n\t' # Set variables ---- user=XXXXXX password=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX node_ip=192.168.0.XXX # End -------------- port=8332 data=$( cat <<-EOF { "jsonrpc": "1.0", "id": "curltest", "method": "getchaintips" } EOF ) # Add -vvvv for verbose output/debugging curl \ -vvvv \ --user "${user}:${password}" \ --data-binary "$data" \ -H 'content-type: text/plain;' \ "${node_ip}:${port}"