88 "fmt"
99 "testing"
1010
11- "github.com/golang/mock/gomock"
1211 "github.com/libp2p/go-libp2p/core/host"
1312 "github.com/libp2p/go-libp2p/core/peer"
1413 "github.com/libp2p/go-libp2p/core/peerstore"
@@ -20,6 +19,7 @@ import (
2019 "github.com/sprintertech/sprinter-signing/tss/ecdsa/resharing"
2120 tsstest "github.com/sprintertech/sprinter-signing/tss/test"
2221 "github.com/stretchr/testify/suite"
22+ "go.uber.org/mock/gomock"
2323)
2424
2525type ResharingTestSuite struct {
@@ -60,7 +60,7 @@ func (s *ResharingTestSuite) Test_ValidResharingProcess_OldAndNewSubset() {
6060 s .MockECDSAStorer .EXPECT ().StoreKeyshare (gomock .Any ()).Return (nil )
6161 resharing := resharing .NewResharing ("resharing2" , 1 , host , & communication , s .MockECDSAStorer )
6262 electorFactory := elector .NewCoordinatorElectorFactory (host , s .BullyConfig )
63- coordinators = append (coordinators , tss .NewCoordinator (host , & communication , electorFactory ))
63+ coordinators = append (coordinators , tss .NewCoordinator (host , & communication , s . MockMetrics , electorFactory ))
6464 processes = append (processes , resharing )
6565 }
6666 tsstest .SetupCommunication (communicationMap )
@@ -107,7 +107,7 @@ func (s *ResharingTestSuite) Test_ValidResharingProcess_RemovePeer() {
107107 s .MockECDSAStorer .EXPECT ().StoreKeyshare (gomock .Any ()).Return (nil )
108108 resharing := resharing .NewResharing ("resharing2" , 1 , host , & communication , s .MockECDSAStorer )
109109 electorFactory := elector .NewCoordinatorElectorFactory (host , s .BullyConfig )
110- coordinators = append (coordinators , tss .NewCoordinator (host , & communication , electorFactory ))
110+ coordinators = append (coordinators , tss .NewCoordinator (host , & communication , s . MockMetrics , electorFactory ))
111111 processes = append (processes , resharing )
112112 }
113113 tsstest .SetupCommunication (communicationMap )
@@ -157,7 +157,7 @@ func (s *ResharingTestSuite) Test_InvalidResharingProcess_InvalidOldThreshold_Le
157157 s .MockECDSAStorer .EXPECT ().GetKeyshare ().Return (share , nil )
158158 resharing := resharing .NewResharing ("resharing3" , 1 , host , & communication , s .MockECDSAStorer )
159159 electorFactory := elector .NewCoordinatorElectorFactory (host , s .BullyConfig )
160- coordinators = append (coordinators , tss .NewCoordinator (host , & communication , electorFactory ))
160+ coordinators = append (coordinators , tss .NewCoordinator (host , & communication , s . MockMetrics , electorFactory ))
161161 processes = append (processes , resharing )
162162 }
163163 tsstest .SetupCommunication (communicationMap )
@@ -206,7 +206,7 @@ func (s *ResharingTestSuite) Test_InvalidResharingProcess_InvalidOldThreshold_Bi
206206 s .MockECDSAStorer .EXPECT ().GetKeyshare ().Return (share , nil )
207207 resharing := resharing .NewResharing ("resharing4" , 1 , host , & communication , s .MockECDSAStorer )
208208 electorFactory := elector .NewCoordinatorElectorFactory (host , s .BullyConfig )
209- coordinators = append (coordinators , tss .NewCoordinator (host , & communication , electorFactory ))
209+ coordinators = append (coordinators , tss .NewCoordinator (host , & communication , s . MockMetrics , electorFactory ))
210210 processes = append (processes , resharing )
211211 }
212212 tsstest .SetupCommunication (communicationMap )
0 commit comments