aboutsummaryrefslogtreecommitdiffstats
path: root/core/crypto/dkg/dkg_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/crypto/dkg/dkg_test.go')
-rw-r--r--core/crypto/dkg/dkg_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/crypto/dkg/dkg_test.go b/core/crypto/dkg/dkg_test.go
index a679cf4..84dc2d4 100644
--- a/core/crypto/dkg/dkg_test.go
+++ b/core/crypto/dkg/dkg_test.go
@@ -394,6 +394,20 @@ func (s *DKGTestSuite) TestPublicKeySharesMove() {
req.True(pubShares2.Equal(pubShares3))
}
+func (s *DKGTestSuite) TestPublicKeySharesConcurrent() {
+ t := 5
+ n := 10
+ IDs := make(IDs, n)
+ for i := range IDs {
+ id := common.NewRandomHash()
+ IDs[i] = NewID(id[:])
+ }
+ _, pubShare := NewPrivateKeyShares(t)
+ for _, id := range IDs {
+ go pubShare.Share(id)
+ }
+}
+
func (s *DKGTestSuite) TestPrivateKeySharesEquality() {
var req = s.Require()
IDs := s.genID(2)