fix: remove explicit param from GossipSubParams constructor (#1080)
This commit is contained in:
parent
09b3e11956
commit
89cad5a3ba
|
@ -51,7 +51,6 @@ when defined(libp2p_expensive_metrics):
|
||||||
|
|
||||||
proc init*(
|
proc init*(
|
||||||
_: type[GossipSubParams],
|
_: type[GossipSubParams],
|
||||||
explicit = true,
|
|
||||||
pruneBackoff = 1.minutes,
|
pruneBackoff = 1.minutes,
|
||||||
unsubscribeBackoff = 5.seconds,
|
unsubscribeBackoff = 5.seconds,
|
||||||
floodPublish = true,
|
floodPublish = true,
|
||||||
|
|
|
@ -102,6 +102,11 @@ type
|
||||||
behaviourPenalty*: float64 # the eventual penalty score
|
behaviourPenalty*: float64 # the eventual penalty score
|
||||||
|
|
||||||
GossipSubParams* {.public.} = object
|
GossipSubParams* {.public.} = object
|
||||||
|
# explicit is used to check if the GossipSubParams instance was created by the user either passing params to GossipSubParams(...)
|
||||||
|
# or GossipSubParams.init(...). In the first case explicit should be set to true when calling the Nim constructor.
|
||||||
|
# In the second case, the param isn't necessary and should be always be set to true by init.
|
||||||
|
# If none of those options were used, it means the instance was created using Nim default values.
|
||||||
|
# In this case, GossipSubParams.init() should be called when initing GossipSub to set the values to their default value defined by nim-libp2p.
|
||||||
explicit*: bool
|
explicit*: bool
|
||||||
pruneBackoff*: Duration
|
pruneBackoff*: Duration
|
||||||
unsubscribeBackoff*: Duration
|
unsubscribeBackoff*: Duration
|
||||||
|
|
Loading…
Reference in New Issue