mirror of https://github.com/vacp2p/nim-libp2p.git
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*(
|
||||
_: type[GossipSubParams],
|
||||
explicit = true,
|
||||
pruneBackoff = 1.minutes,
|
||||
unsubscribeBackoff = 5.seconds,
|
||||
floodPublish = true,
|
||||
|
|
|
@ -102,6 +102,11 @@ type
|
|||
behaviourPenalty*: float64 # the eventual penalty score
|
||||
|
||||
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
|
||||
pruneBackoff*: Duration
|
||||
unsubscribeBackoff*: Duration
|
||||
|
|
Loading…
Reference in New Issue