mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-03 13:23:07 +00:00
wrap topic param validation error
This commit is contained in:
parent
1b387b0068
commit
bb279e3126
@ -123,10 +123,10 @@ type TopicScoreParams struct {
|
||||
|
||||
// peer score parameter validation
|
||||
func (p *PeerScoreParams) validate() error {
|
||||
for _, params := range p.Topics {
|
||||
for topic, params := range p.Topics {
|
||||
err := params.validate()
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("invalid score parameters for topic %s: %w", topic, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user