TopicParams validation tuning

This commit is contained in:
Giovanni Petrantoni 2020-11-28 00:23:09 +09:00
parent 809df8d04d
commit 12db9a4cf2
1 changed files with 0 additions and 2 deletions

View File

@ -274,8 +274,6 @@ proc validateParameters*(parameters: TopicParams): Result[void, cstring] =
err("gossipsub: meshMessageDeliveriesThreshold parameter error, Should be a positive value") err("gossipsub: meshMessageDeliveriesThreshold parameter error, Should be a positive value")
elif parameters.meshMessageDeliveriesCap < parameters.meshMessageDeliveriesThreshold: elif parameters.meshMessageDeliveriesCap < parameters.meshMessageDeliveriesThreshold:
err("gossipsub: meshMessageDeliveriesCap parameter error, Should be >= meshMessageDeliveriesThreshold") err("gossipsub: meshMessageDeliveriesCap parameter error, Should be >= meshMessageDeliveriesThreshold")
elif parameters.meshMessageDeliveriesWindow > 100.milliseconds:
err("gossipsub: meshMessageDeliveriesWindow parameter error, Should be small, 1-5ms")
elif parameters.meshFailurePenaltyWeight >= 0.0: elif parameters.meshFailurePenaltyWeight >= 0.0:
err("gossipsub: meshFailurePenaltyWeight parameter error, Should be a negative value") err("gossipsub: meshFailurePenaltyWeight parameter error, Should be a negative value")
elif parameters.invalidMessageDeliveriesWeight >= 0.0: elif parameters.invalidMessageDeliveriesWeight >= 0.0: