mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
net: only assume all local addresses if listening on any
If `-bind=` is provided then we would bind only to a particular address and should not add all the other addresses of the machine to the list of local addresses. Fixes https://github.com/bitcoin/bitcoin/issues/20184 (case 4.)
This commit is contained in:
@@ -183,7 +183,15 @@ enum class ConnectionType {
|
||||
|
||||
/** Convert ConnectionType enum to a string value */
|
||||
std::string ConnectionTypeAsString(ConnectionType conn_type);
|
||||
|
||||
/**
|
||||
* Look up IP addresses from all interfaces on the machine and add them to the
|
||||
* list of local addresses to self-advertise.
|
||||
* The loopback interface is skipped and only the first address from each
|
||||
* interface is used.
|
||||
*/
|
||||
void Discover();
|
||||
|
||||
uint16_t GetListenPort();
|
||||
|
||||
enum
|
||||
|
||||
Reference in New Issue
Block a user