Before this PR, there were two ways of creating a GossipSubParam instance: using GossipSubParam.initor the GossipSubParams(propertyName: propertyValue) pattern. In the first case, there was no way to specify only a few values and use the rest as the default defined by nim-libp2p, as the init proc doesn't accept params. It was the same for the second case, the values not specified would be initialized as the nim default value for their types. This PR creates a new constructor with default values defined for all the params. The user can choose which ones to override or use the default value defined by the library.
Before this PR, there were two ways of creating a GossipSubParam instance: using
GossipSubParam.init
or theGossipSubParams(propertyName: propertyValue)
pattern. In the first case, there was no way to specify only a few values and use the rest as the default defined by nim-libp2p, as theinit
proc doesn't accept params. It was the same for the second case, the values not specified would be initialized as the nim default value for their types. This PR creates a new constructor with default values defined for all the params. The user can choose which ones to override or use the default value defined by the library.