| 1557 | } |
| 1558 | |
| 1559 | void ThreadOpenAddedConnections() |
| 1560 | { |
| 1561 | { |
| 1562 | LOCK(cs_vAddedNodes); |
| 1563 | vAddedNodes = mapMultiArgs["-addnode"]; |
| 1564 | } |
| 1565 | |
| 1566 | for (unsigned int i = 0; true; i++) |
| 1567 | { |
| 1568 | std::vector<AddedNodeInfo> vInfo = GetAddedNodeInfo(); |
| 1569 | for (const AddedNodeInfo& info : vInfo) { |
| 1570 | if (!info.fConnected) { |
| 1571 | CSemaphoreGrant grant(*semOutbound); |
| 1572 | // If strAddedNode is an IP/port, decode it immediately, so |
| 1573 | // OpenNetworkConnection can detect existing connections to that IP/port. |
| 1574 | CService service(info.strAddedNode, Params().GetDefaultPort()); |
| 1575 | OpenNetworkConnection(CAddress(service, NODE_NONE), false, &grant, info.strAddedNode.c_str(), false); |
| 1576 | MilliSleep(500); |
| 1577 | } |
| 1578 | } |
| 1579 | MilliSleep(120000); // Retry every 2 minutes |
| 1580 | |
| 1581 | } |
| 1582 | } |
| 1583 | |
| 1584 | double getVerificationProgress(const CBlockIndex *tipIn) // here to avoid include loops |
| 1585 | { |
nothing calls this directly
no test coverage detected