net: use V2Transport when NODE_P2P_V2 service flag is present

Co-authored-by: Dhruv Mehta <856960+dhruv@users.noreply.github.com>
This commit is contained in:
Pieter Wuille
2023-08-21 16:55:47 -04:00
parent a4706bc877
commit 62d21ee097
5 changed files with 63 additions and 13 deletions

View File

@@ -311,7 +311,7 @@ static RPCHelpMan addnode()
if (command == "onetry")
{
CAddress addr;
connman.OpenNetworkConnection(addr, /*fCountFailure=*/false, /*grantOutbound=*/nullptr, node_arg.c_str(), ConnectionType::MANUAL);
connman.OpenNetworkConnection(addr, /*fCountFailure=*/false, /*grantOutbound=*/nullptr, node_arg.c_str(), ConnectionType::MANUAL, /*use_v2transport=*/false);
return UniValue::VNULL;
}