aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/util.sh
diff options
context:
space:
mode:
authorCozz Lovan <cozzlovan@yahoo.com>2014-02-14 18:27:15 +0100
committerCozz Lovan <cozzlovan@yahoo.com>2014-06-16 18:56:57 +0200
commit77cbd4623e171ee9c48ada8a421295ed2c8e6c7c (patch)
tree84ff89231b49da39f3ff6d4d8baeded4a3e8c068 /qa/rpc-tests/util.sh
parent529047fcd18acd1b64dc95d6eb69edeaad75d405 (diff)
Let -zapwallettxes recover transaction meta data
Diffstat (limited to 'qa/rpc-tests/util.sh')
-rw-r--r--qa/rpc-tests/util.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/qa/rpc-tests/util.sh b/qa/rpc-tests/util.sh
index 1e7bd6a7ee..b726ef627f 100644
--- a/qa/rpc-tests/util.sh
+++ b/qa/rpc-tests/util.sh
@@ -38,6 +38,10 @@ function AssertEqual {
if (( $( echo "$1 == $2" | bc ) == 0 ))
then
echoerr "AssertEqual: $1 != $2"
+ declare -f CleanUp > /dev/null 2>&1
+ if [[ $? -eq 0 ]] ; then
+ CleanUp
+ fi
exit 1
fi
}
@@ -49,6 +53,10 @@ function CheckBalance {
if (( $( echo "$B == $EXPECT" | bc ) == 0 ))
then
echoerr "bad balance: $B (expected $2)"
+ declare -f CleanUp > /dev/null 2>&1
+ if [[ $? -eq 0 ]] ; then
+ CleanUp
+ fi
exit 1
fi
}