Skip to content

Commit 0f7dc89

Browse files
committed
test: compare /chaininfo response with getblockchaininfo RPC
1 parent ce33194 commit 0f7dc89

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/functional/interface_rest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,10 @@ def run_test(self):
361361
json_obj = self.test_rest_request("/chaininfo")
362362
assert_equal(json_obj['bestblockhash'], bb_hash)
363363

364+
# Compare with normal RPC getblockchaininfo response
365+
blockchain_info = self.nodes[0].getblockchaininfo()
366+
assert_equal(blockchain_info, json_obj)
367+
364368
# Test compatibility of deprecated and newer endpoints
365369
self.log.info("Test compatibility of deprecated and newer endpoints")
366370
assert_equal(self.test_rest_request(f"/headers/{bb_hash}", query_params={"count": 1}), self.test_rest_request(f"/headers/1/{bb_hash}"))

0 commit comments

Comments
 (0)