aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/util.sh
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-12-20 17:12:39 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2013-12-20 17:12:39 +0100
commit5fe19d640e50373ddaa810e5bfff9764d9ac549e (patch)
tree72a53ad596e73a0113d2008eeacc1571fb4547f5 /qa/rpc-tests/util.sh
parent365350140a19459b3c763245339e062d1ae0d733 (diff)
downloadbitcoin-5fe19d640e50373ddaa810e5bfff9764d9ac549e.tar.xz
qt: make wallet test consistent
Add a function `WaitBlocks` to wait for blocks to propagate to all three nodes, and use this instead of waiting a fixed time of one second. Fixes #3445.
Diffstat (limited to 'qa/rpc-tests/util.sh')
-rw-r--r--qa/rpc-tests/util.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/qa/rpc-tests/util.sh b/qa/rpc-tests/util.sh
index dc2a319970..e4e3953748 100644
--- a/qa/rpc-tests/util.sh
+++ b/qa/rpc-tests/util.sh
@@ -82,3 +82,9 @@ function CreateTxn1 {
function SendRawTxn {
$CLI $1 sendrawtransaction $2
}
+
+# Use: GetBlocks <datadir>
+# returns number of blocks from getinfo
+function GetBlocks {
+ ExtractKey blocks "$( $CLI $1 getinfo )"
+}