aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrunoerg <brunoely.gc@gmail.com>2022-09-20 14:10:34 -0300
committerbrunoerg <brunoely.gc@gmail.com>2022-09-20 14:10:34 -0300
commitaee29c5d9ebd8b68fc7e6607d58284f9b91078d1 (patch)
tree24d5758efcedcdee93e08c39bcf024a533f1fd6e
parent0b02ce914e8594e8938e527c91c07f57def4e943 (diff)
test: wait for the expected basic block filter index in `interface_rest`
-rwxr-xr-xtest/functional/interface_rest.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/interface_rest.py b/test/functional/interface_rest.py
index f36bbda3af..610a28c56b 100755
--- a/test/functional/interface_rest.py
+++ b/test/functional/interface_rest.py
@@ -288,6 +288,10 @@ class RESTTest (BitcoinTestFramework):
# See if we can get 5 headers in one response
self.generate(self.nodes[1], 5)
+ expected_filter = {
+ 'basic block filter index': {'synced': True, 'best_block_height': 208},
+ }
+ self.wait_until(lambda: self.nodes[0].getindexinfo() == expected_filter)
json_obj = self.test_rest_request(f"/headers/{bb_hash}", query_params={"count": 5})
assert_equal(len(json_obj), 5) # now we should have 5 header objects
json_obj = self.test_rest_request(f"/blockfilterheaders/basic/{bb_hash}", query_params={"count": 5})