Skip to content

Commit

Permalink
Fixed broken integration tests for DKG
Browse files Browse the repository at this point in the history
  • Loading branch information
durkmurder committed Dec 2, 2024
1 parent 62d399d commit bea9c1a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
3 changes: 1 addition & 2 deletions integration/dkg/dkg_emulator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions integration/dkg/dkg_whiteboard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 0 additions & 4 deletions integration/dkg/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit bea9c1a

Please sign in to comment.