diff --git a/dkg/messages.go b/dkg/messages.go index 51bdbf5e3..43593237d 100644 --- a/dkg/messages.go +++ b/dkg/messages.go @@ -219,6 +219,15 @@ func (reshareMsg *ReshareParams) LoadFromStorage(pk types.ValidatorPK, storage S return nil } +func inOldCommittee(op types.OperatorID, l []types.OperatorID) bool { + for _, opID := range l { + if opID == op { + return true + } + } + return false +} + // Output is the last message in every DKG which marks a specific node's end of process type Output struct { // RequestID for the DKG instance (not used for signing) diff --git a/dkg/node.go b/dkg/node.go index 79c3ca145..af55f8630 100644 --- a/dkg/node.go +++ b/dkg/node.go @@ -65,8 +65,10 @@ func (n *Node) newRunner(id RequestID, initMsg *Init) (Runner, error) { func (n *Node) newResharingRunner(id RequestID, reshareMsg *Reshare) (Runner, error) { reshareParams := &ReshareParams{} - if err := reshareParams.LoadFromStorage(reshareMsg.ValidatorPK, n.config.Storage); err != nil { - return nil, err + if inOldCommittee(n.operator.OperatorID, reshareMsg.OldOperatorIDs) { + if err := reshareParams.LoadFromStorage(reshareMsg.ValidatorPK, n.config.Storage); err != nil { + return nil, err + } } r := &runner{