more docs

This commit is contained in:
vyzo 2020-09-04 14:49:25 +03:00
parent c242b2e7be
commit 14d1a35e0c
2 changed files with 10 additions and 3 deletions

View File

@ -14,8 +14,14 @@ import (
// The tracking of promises is probabilistic to avoid using too much memory.
type gossipTracer struct {
sync.Mutex
msgID MsgIdFunction
promises map[string]map[peer.ID]time.Time
msgID MsgIdFunction
// promises for messages by message ID; for each message tracked, we track the promise
// expiration time for each peer.
promises map[string]map[peer.ID]time.Time
// promises for each peer; for each peer, we track the promised message IDs.
// this index allows us to quickly void promises when a peer is throttled.
peerPromises map[peer.ID]map[string]struct{}
}

View File

@ -188,7 +188,8 @@ type AcceptStatus int
const (
// AcceptAll signals to accept the incoming RPC for full processing
AcceptNone AcceptStatus = iota
// AcceptControl signals to accept the incoming RPC only for control message processing
// AcceptControl signals to accept the incoming RPC only for control message processing by
// the router. Included payload messages will _not_ be pushed to the validation queue.
AcceptControl
// AcceptNone signals to drop the incoming RPC
AcceptAll