From e4c10b3d33700032c31218fa4785b925096df9de Mon Sep 17 00:00:00 2001 From: litiange Date: Fri, 30 Jun 2023 14:26:56 +0800 Subject: [PATCH] Add check if public key is the same after resharing to the same set of nodes. --- share/dkg/pedersen/dkg_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/dkg/pedersen/dkg_test.go b/share/dkg/pedersen/dkg_test.go index ba8d875b9..abd186f77 100644 --- a/share/dkg/pedersen/dkg_test.go +++ b/share/dkg/pedersen/dkg_test.go @@ -667,6 +667,10 @@ func TestDKGResharing(t *testing.T) { newSecret, err := share.RecoverSecret(suite, newSShares, thr, defaultN) require.NoError(t, err) require.Equal(t, oldSecret.String(), newSecret.String()) + // 3. + for i := 0; i < len(dkgs); i++ { + require.Equal(t, shares[i].Public(), newShares[i].Public()) + } } // Test resharing functionality with one node less