diff options
author | brunoerg <brunoely.gc@gmail.com> | 2022-04-06 17:59:37 -0300 |
---|---|---|
committer | brunoerg <brunoely.gc@gmail.com> | 2022-04-06 17:59:37 -0300 |
commit | 0f7dc893ea1776515173dcd0bfe6826e963c90f3 (patch) | |
tree | 843dc3936a6c62074fe9fd0725724ad22bea1e9d /test/functional | |
parent | ce33194ea0ca0b15281386e5c23d70346633b184 (diff) |
test: compare `/chaininfo` response with `getblockchaininfo` RPC
Diffstat (limited to 'test/functional')
-rwxr-xr-x | test/functional/interface_rest.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/interface_rest.py b/test/functional/interface_rest.py index 4f8676ec53..30c9e0c9cd 100755 --- a/test/functional/interface_rest.py +++ b/test/functional/interface_rest.py @@ -361,6 +361,10 @@ class RESTTest (BitcoinTestFramework): json_obj = self.test_rest_request("/chaininfo") assert_equal(json_obj['bestblockhash'], bb_hash) + # Compare with normal RPC getblockchaininfo response + blockchain_info = self.nodes[0].getblockchaininfo() + assert_equal(blockchain_info, json_obj) + # Test compatibility of deprecated and newer endpoints self.log.info("Test compatibility of deprecated and newer endpoints") assert_equal(self.test_rest_request(f"/headers/{bb_hash}", query_params={"count": 1}), self.test_rest_request(f"/headers/1/{bb_hash}")) |