Attempts to open a connection. Currently only used from tests.
Declared in <net.h>
[[requires_capability(0x7fd74b3b7790, 0x7fd74b3b7850), requires_capability(0x7fd74af18400, 0x7fd74af184c0), requires_capability(0x7fd7574ed0b0, 0x7fd7574ed170), requires_capability(0x7fd74f4a8490, 0x7fd74f4a8550), requires_capability(0x7fd75f872780, 0x7fd75f872840), requires_capability(0x7fd75930f600, 0x7fd75930f6c0), requires_capability(0x7fd753e61340, 0x7fd753e61400), requires_capability(0x7fd74d8909b0, 0x7fd74d890a70), requires_capability(0x7fd755d44640, 0x7fd755d44700), requires_capability(0x7fd7598a4550, 0x7fd7598a4610), requires_capability(0x7fd74c8f6d70, 0x7fd74c8f6e30)]]
bool
AddConnection(
std::string const& address,
ConnectionType conn_type,
bool use_v2transport);
bool Returns false if there are no available slots for this connection: - conn_type not a supported ConnectionType - Max total outbound connection capacity filled - Max connection capacity for type is filled
| Name | Description |
|---|---|
| address [in] | Address of node to try connecting to |
| conn_type [in] | ConnectionType::OUTBOUND, ConnectionType::BLOCK_RELAY, ConnectionType::ADDR_FETCH or ConnectionType::FEELER |
| use_v2transport [in] | Set to true if node attempts to connect using BIP 324 v2 transport protocol. |