Skip to content

Commit

Permalink
dkg group key should be the first key in the array
Browse files Browse the repository at this point in the history
  • Loading branch information
kc1116 committed Apr 2, 2024
1 parent 6aacb01 commit 82c5803
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/util/cmd/epochs/cmd/recover.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ func extractRecoverEpochArgs(snapshot *inmem.Snapshot) []cadence.Value {
dkgPubKeys := make([]cadence.Value, 0)
nodeIds := make([]cadence.Value, 0)

dkgGroupKeyCdc, cdcErr := cadence.NewString(currentEpochDKG.GroupKey().String())
if cdcErr != nil {
log.Fatal().Err(cdcErr).Msg("failed to get dkg group key cadence string")
}
dkgPubKeys = append(dkgPubKeys, dkgGroupKeyCdc)
for _, id := range ids {
if id.GetRole() == flow.RoleConsensus {
dkgPubKey, keyShareErr := currentEpochDKG.KeyShare(id.GetNodeID())
Expand Down

0 comments on commit 82c5803

Please sign in to comment.