Skip to content

Commit

Permalink
fix coping val key
Browse files Browse the repository at this point in the history
  • Loading branch information
MatusKysel committed Jul 25, 2024
1 parent e78db59 commit f4cfc43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion protocol/genesis/types/share.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ func ConvertToGenesisShare(share *spectypes.Share, operator *spectypes.Committee
q, pc := types.ComputeQuorumAndPartialQuorum(len(share.Committee))
genesisShare := &genesisspectypes.Share{
OperatorID: operator.OperatorID,
ValidatorPubKey: share.ValidatorPubKey[:], // Ensure this is necessary; remove if ValidatorPubKey is already a slice.
SharePubKey: share.SharePubKey,
Committee: make([]*genesisspectypes.Operator, 0, len(share.Committee)),
Quorum: q,
Expand All @@ -19,6 +18,7 @@ func ConvertToGenesisShare(share *spectypes.Share, operator *spectypes.Committee
FeeRecipientAddress: share.FeeRecipientAddress,
Graffiti: share.Graffiti,
}
copy(genesisShare.ValidatorPubKey[:], share.ValidatorPubKey[:])

for _, c := range share.Committee {
genesisShare.Committee = append(genesisShare.Committee, &genesisspectypes.Operator{
Expand Down

0 comments on commit f4cfc43

Please sign in to comment.