#!/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