mirror of
https://github.com/status-im/status-go.git
synced 2026-08-31 00:51:12 +00:00
The store nodes belong to the fleet, and the waku node already knows its fleet, so it now resolves them itself (fleets.StoreNodes) at Start and feeds its StoreClient — instead of the messenger resolving them and pushing them down via SetStorenodes. - wakuv2 resolves + dials the fleet's store nodes in Start; the StoreNode -> peer.AddrInfo conversion moves from messaging.API into the node. - Remove the SetStorenodes push chain: the Waku interface method, the transport and messaging.API wrappers, and the messenger's AllMailservers/SetStorenodes call. - The history-sync gate no longer checks storenode availability: the waku node always has the fleet's store nodes, so shouldSync just honors the mailservers-enabled setting. - Drop the now-orphaned params.DefaultStoreNodes and the messenger's AllMailservers / allMailserversByFleet / getFleet helpers. - Stop populating MessengerResponse.StoreNodes (the client-visible "mailservers" list); store nodes no longer leave the waku node. Part of pm#380 / status-go#7589 — store-node peer selection was the last piece of peer management still done above the Waku object. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
24 lines
814 B
Go
24 lines
814 B
Go
package messaging
|
|
|
|
import (
|
|
"context"
|
|
|
|
adapters "github.com/status-im/status-go/pkg/messaging/adapters"
|
|
types "github.com/status-im/status-go/pkg/messaging/types"
|
|
)
|
|
|
|
// Query retrieves historic messages for a single batch (one pubsub topic and its
|
|
// content topics over [batch.From, batch.To]). The store node is selected
|
|
// internally — callers no longer pass a peer. shouldProcessNextPage (may be nil)
|
|
// is the per-page early-stop; processEnvelopes controls synchronous handling of
|
|
// fetched envelopes.
|
|
func (a *API) Query(
|
|
ctx context.Context,
|
|
batch types.StoreNodeBatch,
|
|
pageLimit uint64,
|
|
shouldProcessNextPage func(int) (bool, uint64),
|
|
processEnvelopes bool,
|
|
) error {
|
|
return a.core.stack.Transport.Query(ctx, *adapters.ToWakuBatch(&batch), pageLimit, shouldProcessNextPage, processEnvelopes)
|
|
}
|