From c207997071e2a90f32b58ea4c7dd42e15c2be563 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Tue, 15 Oct 2024 19:18:27 -0400 Subject: [PATCH] refactor_: decouple go-waku api from go-waku wakunode --- wakuv2/waku.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wakuv2/waku.go b/wakuv2/waku.go index b51c8791b..b78cf3a90 100644 --- a/wakuv2/waku.go +++ b/wakuv2/waku.go @@ -1145,7 +1145,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) @@ -1293,7 +1293,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 @@ -1302,7 +1302,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)