From deb138959a2ffcb89cd2e3eb8304477526f4a168 Mon Sep 17 00:00:00 2001 From: Potuz Date: Mon, 12 Dec 2022 11:43:48 -0300 Subject: [PATCH] fix validator client --- .../client/beacon-api/beacon_block_json_helpers.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/validator/client/beacon-api/beacon_block_json_helpers.go b/validator/client/beacon-api/beacon_block_json_helpers.go index 0034ed589dd0..b8a5a48b7261 100644 --- a/validator/client/beacon-api/beacon_block_json_helpers.go +++ b/validator/client/beacon-api/beacon_block_json_helpers.go @@ -15,15 +15,19 @@ func jsonifyTransactions(transactions [][]byte) []string { return jsonTransactions } -func jsonifyBlsToExecutionChanges(blsToExecutionChanges []*ethpb.SignedBLSToExecutionChange) []*apimiddleware.BLSToExecutionChangeJson { - jsonBlsToExecutionChanges := make([]*apimiddleware.BLSToExecutionChangeJson, len(blsToExecutionChanges)) +func jsonifyBlsToExecutionChanges(blsToExecutionChanges []*ethpb.SignedBLSToExecutionChange) []*apimiddleware.SignedBLSToExecutionChangeJson { + jsonBlsToExecutionChanges := make([]*apimiddleware.SignedBLSToExecutionChangeJson, len(blsToExecutionChanges)) for index, signedBlsToExecutionChange := range blsToExecutionChanges { blsToExecutionChangeJson := &apimiddleware.BLSToExecutionChangeJson{ ValidatorIndex: uint64ToString(signedBlsToExecutionChange.Message.ValidatorIndex), FromBLSPubkey: hexutil.Encode(signedBlsToExecutionChange.Message.FromBlsPubkey), ToExecutionAddress: hexutil.Encode(signedBlsToExecutionChange.Message.ToExecutionAddress), } - jsonBlsToExecutionChanges[index] = blsToExecutionChangeJson + signedJson := &apimiddleware.SignedBLSToExecutionChangeJson{ + BLSToExecutionChange: blsToExecutionChangeJson, + Signature: hexutil.Encode(signedBlsToExecutionChange.Signature), + } + jsonBlsToExecutionChanges[index] = signedJson } return jsonBlsToExecutionChanges }