mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-29 17:53:20 +00:00
This reverts commit aa5fd79a75f7480be94380bc3e617767e71573e6.
This commit is contained in:
parent
aa5fd79a75
commit
825d5e3c7d
6
score.go
6
score.go
@ -202,9 +202,13 @@ func (ps *peerScore) SetTopicScoreParams(topic string, p *TopicScoreParams) erro
|
||||
ps.Lock()
|
||||
defer ps.Unlock()
|
||||
|
||||
old := ps.params.Topics[topic]
|
||||
old, exist := ps.params.Topics[topic]
|
||||
ps.params.Topics[topic] = p
|
||||
|
||||
if !exist {
|
||||
return nil
|
||||
}
|
||||
|
||||
// check to see if the counter Caps are being lowered; if that's the case we need to recap them
|
||||
recap := false
|
||||
if p.FirstMessageDeliveriesCap < old.FirstMessageDeliveriesCap {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user