mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-07 03:03:58 +01:00
[rpc/net] Allow v2 p2p support in addconnection
This test-only RPC is required when a TestNode initiates an outbound v2 p2p connection. Add a new arg `v2transport` so that the node can attempt v2 connections.
This commit is contained in:
@@ -1184,13 +1184,14 @@ public:
|
||||
* @param[in] address Address of node to try connecting to
|
||||
* @param[in] conn_type ConnectionType::OUTBOUND, ConnectionType::BLOCK_RELAY,
|
||||
* ConnectionType::ADDR_FETCH or ConnectionType::FEELER
|
||||
* @param[in] use_v2transport Set to true if node attempts to connect using BIP 324 v2 transport protocol.
|
||||
* @return 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
|
||||
*/
|
||||
bool AddConnection(const std::string& address, ConnectionType conn_type) EXCLUSIVE_LOCKS_REQUIRED(!m_unused_i2p_sessions_mutex);
|
||||
bool AddConnection(const std::string& address, ConnectionType conn_type, bool use_v2transport) EXCLUSIVE_LOCKS_REQUIRED(!m_unused_i2p_sessions_mutex);
|
||||
|
||||
size_t GetNodeCount(ConnectionDirection) const;
|
||||
uint32_t GetMappedAS(const CNetAddr& addr) const;
|
||||
|
||||
Reference in New Issue
Block a user