Fix getBlockHeaders() should return array. (#2732)

Fix tests.
This commit is contained in:
Eugene Kabanov 2021-07-24 20:22:05 +03:00 committed by GitHub
parent f0c30e31b4
commit f9cd98702e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -538,7 +538,7 @@ proc installBeaconApiHandlers*(router: var RestRouter, node: BeaconNode) =
node.dag.get(blockSlot.blck) node.dag.get(blockSlot.blck)
return RestApiResponse.jsonResponse( return RestApiResponse.jsonResponse(
( [(
# TODO Altair insofar as it should detect the error condition rather # TODO Altair insofar as it should detect the error condition rather
# than crashing. This API is only specified for phase 0 # than crashing. This API is only specified for phase 0
root: bdata.data.phase0Block.root, root: bdata.data.phase0Block.root,
@ -553,7 +553,7 @@ proc installBeaconApiHandlers*(router: var RestRouter, node: BeaconNode) =
), ),
signature: bdata.data.phase0Block.signature signature: bdata.data.phase0Block.signature
) )
) )]
) )
# https://ethereum.github.io/eth2.0-APIs/#/Beacon/getBlockHeader # https://ethereum.github.io/eth2.0-APIs/#/Beacon/getBlockHeader

View File

@ -1555,7 +1555,7 @@
"response": { "response": {
"status": {"operator": "equals", "value": "200"}, "status": {"operator": "equals", "value": "200"},
"headers": [{"key": "Content-Type", "value": "application/json", "operator": "equals"}], "headers": [{"key": "Content-Type", "value": "application/json", "operator": "equals"}],
"body": [{"operator": "jstructcmps", "start": ["data"], "value": {"root": "", "canonical": true, "header": {"message": {"slot": "", "proposer_index": "", "parent_root": "", "state_root": "", "body_root": ""}, "signature": ""}}}] "body": [{"operator": "jstructcmps", "start": ["data"], "value": [{"root": "", "canonical": true, "header": {"message": {"slot": "", "proposer_index": "", "parent_root": "", "state_root": "", "body_root": ""}, "signature": ""}}]}]
} }
}, },
{ {
@ -1567,7 +1567,7 @@
"response": { "response": {
"status": {"operator": "equals", "value": "200"}, "status": {"operator": "equals", "value": "200"},
"headers": [{"key": "Content-Type", "value": "application/json", "operator": "equals"}], "headers": [{"key": "Content-Type", "value": "application/json", "operator": "equals"}],
"body": [{"operator": "jstructcmps", "start": ["data"], "value": {"root": "", "canonical": true, "header": {"message": {"slot": "", "proposer_index": "", "parent_root": "", "state_root": "", "body_root": ""}, "signature": ""}}}] "body": [{"operator": "jstructcmps", "start": ["data"], "value": [{"root": "", "canonical": true, "header": {"message": {"slot": "", "proposer_index": "", "parent_root": "", "state_root": "", "body_root": ""}, "signature": ""}}]}]
} }
}, },
{ {