Skip to content

Commit

Permalink
more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzo committed Sep 7, 2020
1 parent c242b2e commit 14d1a35
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 8 additions & 2 deletions gossip_tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
}

Expand Down
3 changes: 2 additions & 1 deletion pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 14d1a35

Please sign in to comment.