PR #612 introduced made it possible to pass arbitrary string addresses into the aquadoggo cli via args or a config file. Under the hood these are then parsed into socket addresses using to_socket_addrs() (including ip lookup if required) and then converted to Multiaddr if the lookup or parsing fails for any address the cli process exits.
We still require that addresses used in our programmatic configuration structs presented as Multiaddr. This means the above flow is still required when starting a node from within another application. I suggest the following steps to only require string addresses here as well.
change Multiaddr to String in all configuration structs
if to_socket_addrs() fails then stop the node with a useful error
if to_socket_addrs() returns no addresses (ip lookup was performed and no addresses found) then issue a debug warning but don't stop the node
PR #612 introduced made it possible to pass arbitrary string addresses into the aquadoggo cli via args or a config file. Under the hood these are then parsed into socket addresses using
to_socket_addrs()
(including ip lookup if required) and then converted toMultiaddr
if the lookup or parsing fails for any address the cli process exits.We still require that addresses used in our programmatic configuration structs presented as
Multiaddr
. This means the above flow is still required when starting a node from within another application. I suggest the following steps to only require string addresses here as well.Multiaddr
toString
in all configuration structsto_socket_addrs()
fails then stop the node with a useful errorto_socket_addrs()
returns no addresses (ip lookup was performed and no addresses found) then issue a debug warning but don't stop the node