mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-02 14:03:06 +00:00
parent
7ea461955f
commit
041615beda
@ -27,19 +27,6 @@ import
|
||||
logScope:
|
||||
topics = "diagnose connections"
|
||||
|
||||
proc `$`*(cap: Capabilities): string =
|
||||
case cap
|
||||
of Capabilities.Relay:
|
||||
return "Relay"
|
||||
of Capabilities.Store:
|
||||
return "Store"
|
||||
of Capabilities.Filter:
|
||||
return "Filter"
|
||||
of Capabilities.Lightpush:
|
||||
return "Lightpush"
|
||||
of Capabilities.Sync:
|
||||
return "Sync"
|
||||
|
||||
proc allPeers(pm: PeerManager): string =
|
||||
var allStr: string = ""
|
||||
for idx, peer in pm.switch.peerStore.peers():
|
||||
|
||||
@ -20,7 +20,7 @@ method send*(
|
||||
discard (
|
||||
await self.wakuNode.lightpushPublish(some(topic), message, some(servicePeer))
|
||||
).valueOr:
|
||||
if error.code == NO_PEERS_TO_RELAY and
|
||||
if error.code == LightPushErrorCode.NO_PEERS_TO_RELAY and
|
||||
error.desc != some("No peers for topic, skipping publish"):
|
||||
# TODO: We need better separation of errors happening on the client side or the server side.-
|
||||
return err("dial_failure")
|
||||
|
||||
@ -28,6 +28,7 @@ const ProtocolsTable = {
|
||||
"rendezvous": "/rendezvous/",
|
||||
"ipfs-ping": "/ipfs/ping/",
|
||||
"peer-exchange": "/vac/waku/peer-exchange/",
|
||||
"mix": "mix/1.0.0",
|
||||
}.toTable
|
||||
|
||||
const WebSocketPortOffset = 1000
|
||||
|
||||
2
vendor/mix
vendored
2
vendor/mix
vendored
@ -1 +1 @@
|
||||
Subproject commit e45cd05bfdb775a4cb2c9443077a15b9da13c037
|
||||
Subproject commit 5e95337693ad0787baec1ee25293f454c2d105ca
|
||||
@ -1,3 +1,5 @@
|
||||
#!fmt: off
|
||||
|
||||
import os
|
||||
mode = ScriptMode.Verbose
|
||||
|
||||
@ -21,14 +23,15 @@ requires "nim >= 2.2.4",
|
||||
"stew",
|
||||
"stint",
|
||||
"metrics",
|
||||
"libp2p == 1.10.1", # Only for Waku v2
|
||||
"libp2p >= 1.13.0",
|
||||
"web3",
|
||||
"presto",
|
||||
"regex",
|
||||
"results",
|
||||
"db_connector",
|
||||
"minilru",
|
||||
"quic"
|
||||
"quic",
|
||||
"https://github.com/vacp2p/mix#0.1.0"
|
||||
|
||||
### Helper functions
|
||||
proc buildModule(filePath, params = "", lang = "c"): bool =
|
||||
|
||||
@ -3,8 +3,7 @@ import
|
||||
chronicles,
|
||||
bearssl/rand,
|
||||
libp2p/protocols/connectivity/autonat/client,
|
||||
libp2p/protocols/connectivity/autonat/service,
|
||||
libp2p/protocols/connectivity/autonat/types
|
||||
libp2p/protocols/connectivity/autonat/service
|
||||
|
||||
const AutonatCheckInterval = Opt.some(chronos.seconds(30))
|
||||
|
||||
|
||||
@ -1238,7 +1238,7 @@ proc lightpushPublishHandler(
|
||||
WakuLightPushCodec,
|
||||
Opt.some(
|
||||
MixParameters(expectReply: Opt.some(true), numSurbs: Opt.some(byte(1)))
|
||||
# indicating we expect a single reply hence numSurbs = 1
|
||||
# indicating we only want a single path to be used for reply hence numSurbs = 1
|
||||
),
|
||||
).valueOr:
|
||||
error "could not create mix connection"
|
||||
|
||||
@ -96,7 +96,7 @@ proc getEnrsFromCache(
|
||||
|
||||
proc poolFilter*(cluster: Option[uint16], peer: RemotePeerInfo): bool =
|
||||
if peer.origin != Discv5:
|
||||
debug "peer not from discv5", peer = $peer, origin = $peer.origin
|
||||
trace "peer not from discv5", peer = $peer, origin = $peer.origin
|
||||
return false
|
||||
|
||||
if peer.enr.isNone():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user