Skip to content

Commit

Permalink
Revert "fix: topicscore params can't be set for dynamically subscribe…
Browse files Browse the repository at this point in the history
…d topic (libp2p#540)" (libp2p#541)

This reverts commit aa5fd79.
  • Loading branch information
vyzo authored Aug 26, 2023
1 parent aa5fd79 commit 825d5e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion score.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 825d5e3

Please sign in to comment.