mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
fix validator client
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user