mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-21 14:53:11 +00:00
properly parse multiaddress
This commit is contained in:
parent
5f0e581bc7
commit
a480e3b8f8
@ -309,6 +309,16 @@ proc readValue*(r: var TomlReader, val: var SignedPeerRecord) =
|
||||
|
||||
val = SignedPeerRecord.parseCmdArg(uri)
|
||||
|
||||
proc readValue*(r: var TomlReader, val: var MultiAddress) =
|
||||
without maddr =? r.readValue(string).catch, err:
|
||||
error "invalid MultiAddress value", error = err.msg
|
||||
quit QuitFailure
|
||||
|
||||
without val =? MultiAddress.init(maddr).catch, err:
|
||||
error "invalid MultiAddress value", error = err.msg
|
||||
quit QuitFailure
|
||||
|
||||
|
||||
# no idea why confutils needs this:
|
||||
proc completeCmdArg*(T: type EthAddress; val: string): seq[string] =
|
||||
discard
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user