From bea9c1a3fcfcbc811cbec0166314467f49c189bf Mon Sep 17 00:00:00 2001 From: Yurii Oleksyshyn Date: Mon, 2 Dec 2024 22:23:47 +0200 Subject: [PATCH] Fixed broken integration tests for DKG --- integration/dkg/dkg_emulator_test.go | 3 +-- integration/dkg/dkg_whiteboard_test.go | 3 +-- integration/dkg/node.go | 4 ---- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/integration/dkg/dkg_emulator_test.go b/integration/dkg/dkg_emulator_test.go index 3905652729c..1ffe9d8334f 100644 --- a/integration/dkg/dkg_emulator_test.go +++ b/integration/dkg/dkg_emulator_test.go @@ -136,9 +136,8 @@ func (s *EmulatorSuite) runTest(goodNodes int, emulatorProblems bool) { signatures := []crypto.Signature{} indices := []int{} for i, n := range nodes { - beaconKey, safe, err := n.dkgState.RetrieveMyBeaconPrivateKey(nextEpochSetup.Counter) + beaconKey, err := n.dkgState.UnsafeRetrieveMyBeaconPrivateKey(nextEpochSetup.Counter) require.NoError(s.T(), err) - require.True(s.T(), safe) signature, err := beaconKey.Sign(sigData, hasher) require.NoError(s.T(), err) diff --git a/integration/dkg/dkg_whiteboard_test.go b/integration/dkg/dkg_whiteboard_test.go index a81da29315a..d82211771bf 100644 --- a/integration/dkg/dkg_whiteboard_test.go +++ b/integration/dkg/dkg_whiteboard_test.go @@ -295,9 +295,8 @@ func TestWithWhiteboard(t *testing.T) { signatures := []crypto.Signature{} indices := []int{} for i, n := range nodes { - beaconKey, safe, err := n.dkgState.RetrieveMyBeaconPrivateKey(nextEpochSetup.Counter) + beaconKey, err := n.dkgState.UnsafeRetrieveMyBeaconPrivateKey(nextEpochSetup.Counter) require.NoError(t, err) - require.True(t, safe) signature, err := beaconKey.Sign(sigData, hasher) require.NoError(t, err) diff --git a/integration/dkg/node.go b/integration/dkg/node.go index eb1620d32da..2734edd40f5 100644 --- a/integration/dkg/node.go +++ b/integration/dkg/node.go @@ -4,8 +4,6 @@ import ( "crypto" "testing" - "github.com/stretchr/testify/require" - sdk "github.com/onflow/flow-go-sdk" sdkcrypto "github.com/onflow/flow-go-sdk/crypto" "github.com/onflow/flow-go/engine/consensus/dkg" @@ -53,8 +51,6 @@ func (n *node) Ready() <-chan struct{} { } func (n *node) Done() <-chan struct{} { - require.NoError(n.t, n.PublicDB.Close()) - require.NoError(n.t, n.SecretsDB.Close()) return util.AllDone(n.messagingEngine, n.reactorEngine) }