This PR adds a functional test for -discover. It tests different scenarios where localaddresses should be empty or may contain the addresses. Obs: localaddresses is not always accurate, so it's not possible to ensure (100%) it will contain any addresses.
https://github.com/bitcoin/bitcoin/blob/515200298b555845696a07ae2bc0a84a5dd02ae4/src/init.cpp#L449
Obs: See #24258 - It adds test coverage for this field but for nodes with proxy.
