chore: extend `CreateWakuV2Network` with `useShardAsDefaultTopic`
This commit is contained in:
parent
647c3b0fd8
commit
92f43bac78
|
@ -134,7 +134,7 @@ type MessengerCommunitiesTokenPermissionsSuite struct {
|
|||
func (s *MessengerCommunitiesTokenPermissionsSuite) SetupTest() {
|
||||
s.logger = tt.MustCreateTestLogger()
|
||||
|
||||
wakuNodes := CreateWakuV2Network(&s.Suite, s.logger, []string{"owner", "bob", "alice"})
|
||||
wakuNodes := CreateWakuV2Network(&s.Suite, s.logger, false, []string{"owner", "bob", "alice"})
|
||||
|
||||
ownerLogger := s.logger.With(zap.String("name", "owner"))
|
||||
s.ownerWaku = wakuNodes[0]
|
||||
|
|
|
@ -91,7 +91,7 @@ type MessengerMessagesTrackingSuite struct {
|
|||
func (s *MessengerMessagesTrackingSuite) SetupTest() {
|
||||
s.logger = tt.MustCreateTestLogger()
|
||||
|
||||
wakuNodes := CreateWakuV2Network(&s.Suite, s.logger, []string{"bob", "alice"})
|
||||
wakuNodes := CreateWakuV2Network(&s.Suite, s.logger, false, []string{"bob", "alice"})
|
||||
|
||||
s.bobWaku = wakuNodes[0]
|
||||
s.bob, s.bobInterceptor = s.newMessenger(s.bobWaku, s.logger.With(zap.String("name", "bob")))
|
||||
|
|
|
@ -40,7 +40,7 @@ func TestMessengerOfflineSuite(t *testing.T) {
|
|||
func (s *MessengerOfflineSuite) SetupTest() {
|
||||
s.logger = tt.MustCreateTestLogger()
|
||||
|
||||
wakuNodes := CreateWakuV2Network(&s.Suite, s.logger, []string{"owner", "bob", "alice"})
|
||||
wakuNodes := CreateWakuV2Network(&s.Suite, s.logger, false, []string{"owner", "bob", "alice"})
|
||||
|
||||
ownerLogger := s.logger.With(zap.String("name", "owner"))
|
||||
s.ownerWaku = wakuNodes[0]
|
||||
|
|
|
@ -311,11 +311,11 @@ func NewWakuV2(s *suite.Suite, logger *zap.Logger, useLocalWaku bool, enableStor
|
|||
return wakuNode
|
||||
}
|
||||
|
||||
func CreateWakuV2Network(s *suite.Suite, parentLogger *zap.Logger, nodeNames []string) []types.Waku {
|
||||
func CreateWakuV2Network(s *suite.Suite, parentLogger *zap.Logger, useShardAsDefaultTopic bool, nodeNames []string) []types.Waku {
|
||||
nodes := make([]*waku2.Waku, len(nodeNames))
|
||||
for i, name := range nodeNames {
|
||||
logger := parentLogger.With(zap.String("name", name+"-waku"))
|
||||
wakuNode := NewWakuV2(s, logger, true, false, false, 0)
|
||||
wakuNode := NewWakuV2(s, logger, true, false, useShardAsDefaultTopic, 0)
|
||||
nodes[i] = wakuNode
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue