Add target to getblock(header) in RPC and REST

This commit is contained in:
Sjors Provoost
2025-01-03 10:54:45 +01:00
parent 341f932516
commit 2a7bfebd5e
7 changed files with 30 additions and 16 deletions

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