Skip to content

Commit

Permalink
refactor_: decouple go-waku api from go-waku wakunode
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-ramos committed Oct 23, 2024
1 parent 7ad58d8 commit 777aefb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wakuv2/waku.go
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ func (w *Waku) Start() error {
if w.cfg.EnableMissingMessageVerification {

w.missingMsgVerifier = missing.NewMissingMessageVerifier(
w.node.Store(),
missing.NewDefaultStorenodeRequestor(w.node.Store()),
w,
w.node.Timesource(),
w.logger)
Expand Down Expand Up @@ -1273,7 +1273,7 @@ func (w *Waku) startMessageSender() error {
publishMethod = publish.LightPush
}

sender, err := publish.NewMessageSender(publishMethod, w.node.Lightpush(), w.node.Relay(), w.logger)
sender, err := publish.NewMessageSender(publishMethod, publish.NewDefaultPublisher(w.node.Lightpush(), w.node.Relay()), w.logger)
if err != nil {
w.logger.Error("failed to create message sender", zap.Error(err))
return err
Expand All @@ -1282,7 +1282,7 @@ func (w *Waku) startMessageSender() error {
if w.cfg.EnableStoreConfirmationForMessagesSent {
msgStoredChan := make(chan gethcommon.Hash, 1000)
msgExpiredChan := make(chan gethcommon.Hash, 1000)
messageSentCheck := publish.NewMessageSentCheck(w.ctx, w.node.Store(), w.StorenodeCycle, w.node.Timesource(), msgStoredChan, msgExpiredChan, w.logger)
messageSentCheck := publish.NewMessageSentCheck(w.ctx, publish.NewDefaultStorenodeMessageVerifier(w.node.Store()), w.StorenodeCycle, w.node.Timesource(), msgStoredChan, msgExpiredChan, w.logger)
sender.WithMessageSentCheck(messageSentCheck)

w.wg.Add(1)
Expand Down

0 comments on commit 777aefb

Please sign in to comment.