aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-09-21 09:55:00 +0200
committerMacroFake <falke.marco@gmail.com>2022-09-21 09:55:07 +0200
commit7184fb866fff2f3557aea79ed0a967995e298f0a (patch)
tree5fbc9cbba3f3b2a9ba5213e6818b6760011c7f60 /test
parent9e2a2b88d5cae247bd2dd5aa32743198a5d4841b (diff)
parentaee29c5d9ebd8b68fc7e6607d58284f9b91078d1 (diff)
Merge bitcoin/bitcoin#26143: test: wait for the expected basic block filter index in `interface_rest`
aee29c5d9ebd8b68fc7e6607d58284f9b91078d1 test: wait for the expected basic block filter index in `interface_rest` (brunoerg) Pull request description: Fixes #26098 Wait for the expected 'basic block filter index' to not cause issues when calling `/blockfilterheaders/basic/`, like: https://github.com/bitcoin/bitcoin/blob/9bd842a5928f160c1bc8fca6ca7d8d43f096fd6a/src/rest.cpp#L423-L424 Top commit has no ACKs. Tree-SHA512: 36abe28a76cd01ce7ac1ae9258ce1a9a5473d985c498d915c1130256bc800d0d1207708a195b78bbcb00478ec9c373a2fbfeb26c1fddeb35abe8b253e0308058
Diffstat (limited to 'test')
-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})