mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-27 06:19:09 +01:00
test: wait for the expected basic block filter index in interface_rest
This commit is contained in:
@@ -288,6 +288,10 @@ class RESTTest (BitcoinTestFramework):
|
|||||||
|
|
||||||
# See if we can get 5 headers in one response
|
# See if we can get 5 headers in one response
|
||||||
self.generate(self.nodes[1], 5)
|
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})
|
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
|
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})
|
json_obj = self.test_rest_request(f"/blockfilterheaders/basic/{bb_hash}", query_params={"count": 5})
|
||||||
|
|||||||
Reference in New Issue
Block a user