pubsubpeer, chronicles explicit override

This commit is contained in:
Giovanni Petrantoni 2020-07-18 18:09:40 +09:00
parent 17ac11f2b0
commit 13c87a76c0
2 changed files with 4 additions and 2 deletions

View File

@ -348,7 +348,7 @@ proc updateScores(g: GossipSub) = # avoid async
let now = Moment.now()
for peer, stats in g.peerStats:
debug "updating peer score", peer = peer.id, gossipTopics = peer.topics.len
debug "updating peer score", peer, gossipTopics = peer.topics.len
# TODO
if not peer.connected:
@ -357,7 +357,7 @@ proc updateScores(g: GossipSub) = # avoid async
# Per topic
for topic in peer.topics:
debug "updating peer topic's scores", peer = peer.id, topic
debug "updating peer topic's scores", peer, topic
# Defect on purpose, no magic here please, this should not fail!
let topicParams = g.topics[topic].parameters

View File

@ -44,6 +44,8 @@ type
RPCHandler* = proc(peer: PubSubPeer, msg: seq[RPCMsg]): Future[void] {.gcsafe.}
chronicles.formatIt(PubSubPeer): it.peerInfo.id
func score*(p: PubSubPeer): float64 =
# TODO
0.0