aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/util.sh
diff options
context:
space:
mode:
Diffstat (limited to 'qa/rpc-tests/util.sh')
-rw-r--r--qa/rpc-tests/util.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/qa/rpc-tests/util.sh b/qa/rpc-tests/util.sh
index d1e4c941cc..9001c42fbc 100644
--- a/qa/rpc-tests/util.sh
+++ b/qa/rpc-tests/util.sh
@@ -41,8 +41,9 @@ function AssertEqual {
# CheckBalance -datadir=... amount account minconf
function CheckBalance {
+ declare -i EXPECT="$2"
B=$( $CLI $1 getbalance $3 $4 )
- if (( $( echo "$B == $2" | bc ) == 0 ))
+ if (( $( echo "$B == $EXPECT" | bc ) == 0 ))
then
echoerr "bad balance: $B (expected $2)"
exit 1
@@ -87,5 +88,5 @@ function SendRawTxn {
# Use: GetBlocks <datadir>
# returns number of blocks from getinfo
function GetBlocks {
- ExtractKey blocks "$( $CLI $1 getinfo )"
+ $CLI $1 getblockcount
}