Skip to content

Commit

Permalink
removing debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmer committed Dec 17, 2024
1 parent 3ad38a7 commit e524428
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
2 changes: 0 additions & 2 deletions library/libwaku.nim
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ proc onTopicHealthChange(ctx: ptr WakuContext): TopicHealthChangeHandler =
return proc(
pubsubTopic: PubsubTopic, topicHealth: TopicHealth
): Future[system.void] {.async.} =
echo "------------ GABRIEL onTopicHealthChange ----------"

# Callback that hadles the Waku Relay events. i.e. messages or errors.
if isNil(ctx[].eventCallback):
error "eventCallback is nil"
Expand Down
8 changes: 0 additions & 8 deletions waku/node/peer_manager/peer_manager.nim
Original file line number Diff line number Diff line change
Expand Up @@ -911,10 +911,6 @@ proc prunePeerStoreLoop(pm: PeerManager) {.async.} =
await sleepAsync(PrunePeerStoreInterval)

proc calculateTopicHealth(wakuRelay: WakuRelay, topic: string): TopicHealth =
echo "-------- printing topics in mesh"
for topic in toSeq(wakuRelay.mesh.keys):
echo "------- topic in mesh: ", topic

let numPeersInMesh = wakuRelay.getNumPeersInMesh(topic).valueOr:
error "Could not calculate topic health", topic = topic, error = error
return TopicHealth.UNHEALTHY
Expand All @@ -935,15 +931,11 @@ proc updateTopicsHealth(pm: PeerManager): Future[void] =
oldHealth = pm.topicsHealth.getOrDefault(topic)
currentHealth = pm.wakuRelay.calculateTopicHealth(topic)

info "----------- updateTopicsHealth",
topic = topic, oldHealth = oldHealth, currentHealth = currentHealth
if oldHealth == currentHealth:
continue

echo "--------- GABRIEL topic health change 1"
pm.topicsHealth[topic] = currentHealth
if not pm.onTopicHealthChange.isNil():
echo "--------- GABRIEL topic health change 2"
let fut = pm.onTopicHealthChange(topic, currentHealth)
if not fut.completed(): # Fast path for successful sync handlers
futs.add(fut)
Expand Down

0 comments on commit e524428

Please sign in to comment.