From fceb00d2346c7cc4541e66201691259d4ed45e70 Mon Sep 17 00:00:00 2001 From: vyzo Date: Sun, 14 Jan 2018 02:24:13 +0200 Subject: [PATCH] improved comment about global validation throttle --- floodsub.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/floodsub.go b/floodsub.go index 5e2fea5..2f4df69 100644 --- a/floodsub.go +++ b/floodsub.go @@ -373,7 +373,10 @@ func (p *PubSub) pushMsg(subs []*Subscription, src peer.ID, msg *Message) { } if needval { - // validation is asynchronous and globally throttled with the throttleValidate semaphore + // validation is asynchronous and globally throttled with the throttleValidate semaphore. + // the purpose of the global throttle is to bound the goncurrency possible from incoming + // network traffic; each subscription also has an individual throttle to preclude + // slow (or faulty) validators from starving other topics; see validate below. select { case p.validateThrottle <- struct{}{}: go func() {