formatting

This commit is contained in:
E M 2026-02-16 23:01:32 +11:00
parent 04f7c6cfd5
commit 33f7ebfa4f
No known key found for this signature in database
2 changed files with 8 additions and 6 deletions

View File

@ -136,9 +136,11 @@ type
.}: OutDir
listenPort* {.
desc: "Port to listen on for remote peer connections. Announced in the DHT as /ip4/0.0.0.0/tcp/",
desc:
"Port to listen on for remote peer connections. Announced in the DHT as /ip4/0.0.0.0/tcp/",
defaultValue: 0,
defaultValueDesc: "Chooses a random port for the MultiAddress, eg /ip4/0.0.0.0/tcp/0",
defaultValueDesc:
"Chooses a random port for the MultiAddress, eg /ip4/0.0.0.0/tcp/0",
abbr: "l",
name: "listen-port"
.}: int

View File

@ -139,10 +139,10 @@ proc new*(
T: type StorageServer, config: StorageConf, privateKey: StoragePrivateKey
): StorageServer =
## create StorageServer including setting up datastore, repostore, etc
let listenAddr = MultiAddress
.init(DefaultListenAddress & $config.listenPort)
.expect("Default multiaddress and provied port not valid")
let listenAddr = MultiAddress.init(DefaultListenAddress & $config.listenPort).expect(
"Default multiaddress and provied port not valid"
)
let switch = SwitchBuilder
.new()
.withPrivateKey(privateKey)