Compare commits

...

2 Commits

Author SHA1 Message Date
Pearson White
7f1b5b7fb6 bump chronicles version 2025-09-09 09:58:00 -04:00
akshaya
19758fbd4d Add info log for debugging 2025-09-09 09:57:24 -04:00
3 changed files with 6 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ skipDirs = @["tests", "examples", "Nim", "tools", "scripts", "docs"]
requires "nim >= 2.0.0",
"nimcrypto >= 0.6.0 & < 0.7.0", "dnsclient >= 0.3.0 & < 0.4.0", "bearssl >= 0.2.5",
"chronicles >= 0.11.0 & < 0.12.0", "chronos >= 4.0.4", "metrics", "secp256k1",
"chronicles >= 0.11.0", "chronos >= 4.0.4", "metrics", "secp256k1",
"stew >= 0.4.0", "websock >= 0.2.0", "unittest2", "results", "quic >= 0.2.15",
"https://github.com/vacp2p/nim-jwt.git#18f8378de52b241f321c1f9ea905456e89b95c6f"

View File

@@ -275,6 +275,9 @@ proc broadcast*(
else:
# Fast path that only encodes message once
let encoded = encodeRpcMsg(msg, p.anonymize)
info "SEND ENCODED MSG 1", data = shortLog(msg), useCustomConn, isHighPriority
for peer in sendPeers:
asyncSpawn peer.sendEncoded(encoded, isHighPriority, useCustomConn)

View File

@@ -545,9 +545,11 @@ proc send*(
if encoded.len > p.maxMessageSize and msg.messages.len > 1:
for encodedSplitMsg in splitRPCMsg(p, msg, p.maxMessageSize, anonymize):
asyncSpawn p.sendEncoded(encodedSplitMsg, isHighPriority, useCustomConn)
info "SEND ENCODED MSG 2", data = shortLog(msg), useCustomConn, isHighPriority
else:
# If the message size is within limits, send it as is
trace "sending msg to peer", peer = p, rpcMsg = shortLog(msg)
info "SEND ENCODED MSG 3", data = shortLog(msg), useCustomConn, isHighPriority
asyncSpawn p.sendEncoded(encoded, isHighPriority, useCustomConn)
proc canAskIWant*(p: PubSubPeer, msgId: MessageId): bool =