diff --git a/share/dkg/dkg.go b/share/dkg/dkg.go index fae92af66..19135c104 100644 --- a/share/dkg/dkg.go +++ b/share/dkg/dkg.go @@ -192,7 +192,7 @@ type DistKeyGenerator struct { // NewDistKeyHandler takes a Config and returns a DistKeyGenerator that is able // to drive the DKG or resharing protocol. func NewDistKeyHandler(c *Config) (*DistKeyGenerator, error) { - if c.NewNodes == nil && c.OldNodes == nil { + if len(c.NewNodes) == 0 && len(c.OldNodes) == 0 { return nil, errors.New("dkg: can't run with empty node list") } if len(c.Nonce) != NonceLength { @@ -207,7 +207,7 @@ func NewDistKeyHandler(c *Config) (*DistKeyGenerator, error) { isResharing = true } if isResharing { - if c.OldNodes == nil { + if len(c.OldNodes) == 0 { return nil, errors.New("dkg: resharing config needs old nodes list") } if c.OldThreshold == 0 {