From f005819cabe8b88188366962a25925024d872b51 Mon Sep 17 00:00:00 2001 From: Dirk McCormick Date: Fri, 1 May 2020 11:04:05 -0400 Subject: [PATCH] docs: MessageQueue docs --- internal/messagequeue/messagequeue.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/messagequeue/messagequeue.go b/internal/messagequeue/messagequeue.go index a3e2179..24e8097 100644 --- a/internal/messagequeue/messagequeue.go +++ b/internal/messagequeue/messagequeue.go @@ -161,8 +161,8 @@ func (r *recallWantlist) SentAt(c cid.Cid, at time.Time) { } // ClearSentAt clears out the record of the time a want was sent. -// We clear the sent at time when we receive a response for a key so that -// subsequent responses for the key don't appear to be even further delayed. +// We clear the sent at time when we receive a response for a key as we +// only need the first response for latency measurement. func (r *recallWantlist) ClearSentAt(c cid.Cid) { delete(r.sentAt, c) } @@ -201,6 +201,7 @@ type DontHaveTimeoutManager interface { AddPending([]cid.Cid) // CancelPending removes the wants CancelPending([]cid.Cid) + // UpdateMessageLatency informs the manager of a new latency measurement UpdateMessageLatency(time.Duration) } -- GitLab