mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-23 11:48:33 +00:00
fix produceBlock response to return correct type (#2792)
This commit is contained in:
parent
6e46445da2
commit
bfe5e74607
@ -201,7 +201,7 @@ proc installValidatorApiHandlers*(router: var RestRouter, node: BeaconNode) =
|
||||
else:
|
||||
case message.kind
|
||||
of BeaconBlockFork.Phase0:
|
||||
RestApiResponse.jsonResponse(message.phase0Block)
|
||||
RestApiResponse.jsonResponse(message.phase0Block.message)
|
||||
of BeaconBlockFork.Altair:
|
||||
return RestApiResponse.jsonError(Http400, BlockProduceError)
|
||||
|
||||
@ -265,11 +265,11 @@ proc installValidatorApiHandlers*(router: var RestRouter, node: BeaconNode) =
|
||||
case message.kind
|
||||
of BeaconBlockFork.Phase0:
|
||||
RestApiResponse.jsonResponse(
|
||||
(version: "phase0", data: message.phase0Block)
|
||||
(version: "phase0", data: message.phase0Block.message)
|
||||
)
|
||||
of BeaconBlockFork.Altair:
|
||||
RestApiResponse.jsonResponse(
|
||||
(version: "altair", data: message.altairBlock)
|
||||
(version: "altair", data: message.altairBlock.message)
|
||||
)
|
||||
|
||||
# https://ethereum.github.io/eth2.0-APIs/#/Validator/produceAttestationData
|
||||
|
Loading…
x
Reference in New Issue
Block a user