mirror of
https://github.com/logos-messaging/logos-messaging-go.git
synced 2026-01-07 00:13:13 +00:00
fix: store query by hash (#1282)
This commit is contained in:
parent
f59588a970
commit
900b98812a
9
.github/docker-compose/nwaku.yml
vendored
9
.github/docker-compose/nwaku.yml
vendored
@ -1,6 +1,13 @@
|
||||
services:
|
||||
nwaku:
|
||||
image: "harbor.status.im/wakuorg/nwaku:latest"
|
||||
command: ["--relay", "--store", "--nodekey=1122334455667788990011223344556677889900112233445566778899001122", "--cluster-id=99", "--pubsub-topic=/waku/2/rs/99/1"]
|
||||
command:
|
||||
[
|
||||
"--relay",
|
||||
"--store",
|
||||
"--nodekey=1122334455667788990011223344556677889900112233445566778899001122",
|
||||
"--cluster-id=99",
|
||||
"--shard=1",
|
||||
]
|
||||
ports:
|
||||
- "60000"
|
||||
|
||||
@ -6,6 +6,7 @@ import (
|
||||
"github.com/libp2p/go-libp2p/core/peer"
|
||||
"github.com/waku-org/go-waku/waku/v2/protocol/pb"
|
||||
"github.com/waku-org/go-waku/waku/v2/protocol/store"
|
||||
"github.com/waku-org/go-waku/waku/v2/utils"
|
||||
)
|
||||
|
||||
func NewDefaultStorenodeMessageVerifier(store *store.WakuStore) StorenodeMessageVerifier {
|
||||
@ -18,10 +19,13 @@ type defaultStorenodeMessageVerifier struct {
|
||||
store *store.WakuStore
|
||||
}
|
||||
|
||||
func (d *defaultStorenodeMessageVerifier) MessageHashesExist(ctx context.Context, requestID []byte, peerID peer.AddrInfo, pageSize uint64, messageHashes []pb.MessageHash) ([]pb.MessageHash, error) {
|
||||
func (d *defaultStorenodeMessageVerifier) MessageHashesExist(ctx context.Context, requestID []byte, peerInfo peer.AddrInfo, pageSize uint64, messageHashes []pb.MessageHash) ([]pb.MessageHash, error) {
|
||||
|
||||
addrs := utils.EncapsulatePeerID(peerInfo.ID, peerInfo.Addrs...)
|
||||
|
||||
var opts []store.RequestOption
|
||||
opts = append(opts, store.WithRequestID(requestID))
|
||||
opts = append(opts, store.WithPeerAddr(peerID.Addrs...))
|
||||
opts = append(opts, store.WithPeerAddr(addrs...))
|
||||
opts = append(opts, store.WithPaging(false, pageSize))
|
||||
opts = append(opts, store.IncludeData(false))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user