don't use MaResult as default in newStandardSwitch (#578)
This commit is contained in:
parent
24132d7129
commit
34787728a3
|
@ -184,8 +184,9 @@ proc build*(b: SwitchBuilder): Switch
|
|||
|
||||
return switch
|
||||
|
||||
proc newStandardSwitch*(privKey = none(PrivateKey),
|
||||
address = MultiAddress.init("/ip4/127.0.0.1/tcp/0"),
|
||||
proc newStandardSwitch*(
|
||||
privKey = none(PrivateKey),
|
||||
address = MultiAddress.init("/ip4/127.0.0.1/tcp/0").tryGet(),
|
||||
secureManagers: openarray[SecureProtocol] = [
|
||||
SecureProtocol.Noise,
|
||||
],
|
||||
|
@ -203,7 +204,7 @@ proc newStandardSwitch*(privKey = none(PrivateKey),
|
|||
|
||||
var b = SwitchBuilder
|
||||
.new()
|
||||
.withAddress(address.expect("Should have been initialized with default"))
|
||||
.withAddress(address)
|
||||
.withRng(rng)
|
||||
.withMaxConnections(maxConnections)
|
||||
.withMaxIn(maxIn)
|
||||
|
|
Loading…
Reference in New Issue