mirror of
https://github.com/logos-messaging/go-waku-rendezvous.git
synced 2026-01-02 13:13:08 +00:00
fix: set max limit to 50 nodes and fix empty peer id
This commit is contained in:
parent
58fe0c6241
commit
020ef08b26
@ -68,7 +68,7 @@ func (c *rendezvousDiscovery) FindPeers(ctx context.Context, ns string, opts ...
|
||||
return nil, err
|
||||
}
|
||||
|
||||
const maxLimit = 1000
|
||||
const maxLimit = 50
|
||||
limit := options.Limit
|
||||
if limit == 0 || limit > maxLimit {
|
||||
limit = maxLimit
|
||||
|
||||
3
svc.go
3
svc.go
@ -172,7 +172,8 @@ func (rz *RendezvousService) handleRegister(p peer.ID, m *pb.Message_Register) *
|
||||
mpid := mpi.GetId()
|
||||
var mp peer.ID
|
||||
if mpid != nil {
|
||||
mp, err := peer.IDFromBytes(mpid)
|
||||
var err error
|
||||
mp, err = peer.IDFromBytes(mpid)
|
||||
if err != nil {
|
||||
return newRegisterResponseError(pb.Message_E_INVALID_PEER_INFO, "bad peer id")
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user