Add target to getblock(header) in RPC and REST

This commit is contained in:
Sjors Provoost committed 2025-01-22 12:04:02 +01:00
1 parent 341f932516
commit 2a7bfebd5e
7 files changed
+30 -16

No files matched your search

+1 -1
View File
@@ -289,7 +289,7 @@ class RESTTest (BitcoinTestFramework):
# Compare with normal RPC block response
rpc_block_json = self.nodes[0].getblock(bb_hash)
for key in ['hash', 'confirmations', 'height', 'version', 'merkleroot', 'time', 'nonce', 'bits', 'difficulty', 'chainwork', 'previousblockhash']:
for key in ['hash', 'confirmations', 'height', 'version', 'merkleroot', 'time', 'nonce', 'bits', 'target', 'difficulty', 'chainwork', 'previousblockhash']:
assert_equal(json_obj[0][key], rpc_block_json[key])
# See if we can get 5 headers in one response