You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
834 B
30 lines
834 B
#!/bin/bash
|
|
|
|
#GETRECEIVEDBYACCOUNT RPC
|
|
sleep 3
|
|
printf "\n"
|
|
|
|
printf "Executing [RPC: GETRECEIVEDBYACCOUNT]\n"
|
|
printf "=====================================\n"
|
|
|
|
curl -s --url "http://127.0.0.1:7778" --data "{\"agent\":\"bitcoinrpc\",\"method\":\"getreceivedbyaccount\",\"account\":\"RMcHHn9RtkdtgVHiCxysrG8q2EQTYiJfRT\",\"includeempty\":\"2\"}" > /tmp/getreceivedbyaccount
|
|
|
|
printf "\n"
|
|
|
|
# call json_extract script to get the RPC results value
|
|
r_grba=$(~/tests/./json_extract /tmp/getreceivedbyaccount result)
|
|
err_grba=$(~/tests/./json_extract /tmp/getreceivedbyaccount error)
|
|
|
|
|
|
if [ "$r_grba" -eq 0 ]
|
|
then
|
|
printf "PASSED: GETRECEIVEDBYACCOUNT\n\n"
|
|
let passed+=1
|
|
rm -f /tmp/getreceivedbyaccount
|
|
|
|
else
|
|
printf "FAILED: (Returning Integer WILL IMPLEMENT LATER)\n"
|
|
printf "ERROR: %s:\n\n" "$err_grba"
|
|
let failed+=1
|
|
fi
|
|
|
|
|