Skip to content

Commit

Permalink
fix_: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alwx committed May 13, 2024
1 parent e887700 commit f8abe7f
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 10 deletions.
4 changes: 2 additions & 2 deletions protocol/common/message_sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ func (s *MessageSender) unwrapDatasyncMessage(m *v1protocol.StatusMessage, respo
response.DatasyncRequests = append(response.DatasyncRequests, datasyncMessage.Requests...)
for _, o := range datasyncMessage.GroupOffers {
for _, mID := range o.MessageIds {
response.DatasyncOffers = append(response.DatasyncOffers, DatasyncOffer{ChatID: o.GroupId, MessageID: mID})
response.DatasyncOffers = append(response.DatasyncOffers, DatasyncOffer{GroupID: o.GroupId, MessageID: mID})
}
}

Expand Down Expand Up @@ -834,7 +834,7 @@ func (s *MessageSender) HandleMessages(wakuMessage *types.Message) (*HandleMessa
}

type DatasyncOffer struct {
ChatID []byte
GroupID []byte
MessageID []byte
}

Expand Down
4 changes: 2 additions & 2 deletions protocol/messenger_peersyncing.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
v1protocol "github.com/status-im/status-go/protocol/v1"
)

var peerSyncingLoopInterval = 60 * time.Second
var peerSyncingLoopInterval time.Duration = 60 * time.Second
var maxAdvertiseMessages = 40

func (m *Messenger) markDeliveredMessages(acks [][]byte) {
Expand Down Expand Up @@ -229,7 +229,7 @@ func (m *Messenger) OnDatasyncOffer(response *common.HandleMessageResponse) erro
var offeredMessages []peersyncing.SyncMessage

for _, o := range offers {
offeredMessages = append(offeredMessages, peersyncing.SyncMessage{ChatID: o.ChatID, ID: o.MessageID})
offeredMessages = append(offeredMessages, peersyncing.SyncMessage{ChatID: o.GroupID, ID: o.MessageID})
}

messagesToFetch, err := m.peersyncing.OnOffer(offeredMessages)
Expand Down
36 changes: 31 additions & 5 deletions protocol/migrations/migrations.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion protocol/peersyncing/peersyncing_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package peersyncing

import (
"github.com/status-im/status-go/eth-node/types"
"testing"

"github.com/stretchr/testify/suite"

"github.com/status-im/status-go/appdatabase"
"github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/protocol/sqlite"
"github.com/status-im/status-go/t/helpers"
)
Expand Down

0 comments on commit f8abe7f

Please sign in to comment.