|
|
|
@ -1304,8 +1304,8 @@ void CConnman::NotifyNumConnectionsChanged()
|
|
|
|
|
}
|
|
|
|
|
if(vNodesSize != nPrevNodeCount) {
|
|
|
|
|
nPrevNodeCount = vNodesSize;
|
|
|
|
|
if (clientInterface) {
|
|
|
|
|
clientInterface->NotifyNumConnectionsChanged(vNodesSize);
|
|
|
|
|
if (m_client_interface) {
|
|
|
|
|
m_client_interface->NotifyNumConnectionsChanged(vNodesSize);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2449,8 +2449,8 @@ void CConnman::SetNetworkActive(bool active)
|
|
|
|
|
|
|
|
|
|
fNetworkActive = active;
|
|
|
|
|
|
|
|
|
|
if (clientInterface) {
|
|
|
|
|
clientInterface->NotifyNetworkActiveChanged(fNetworkActive);
|
|
|
|
|
if (m_client_interface) {
|
|
|
|
|
m_client_interface->NotifyNetworkActiveChanged(fNetworkActive);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2476,8 +2476,8 @@ bool CConnman::Bind(const CService &addr, unsigned int flags, NetPermissionFlags
|
|
|
|
|
}
|
|
|
|
|
bilingual_str strError;
|
|
|
|
|
if (!BindListenPort(addr, strError, permissions)) {
|
|
|
|
|
if ((flags & BF_REPORT_ERROR) && clientInterface) {
|
|
|
|
|
clientInterface->ThreadSafeMessageBox(strError, "", CClientUIInterface::MSG_ERROR);
|
|
|
|
|
if ((flags & BF_REPORT_ERROR) && m_client_interface) {
|
|
|
|
|
m_client_interface->ThreadSafeMessageBox(strError, "", CClientUIInterface::MSG_ERROR);
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
@ -2516,8 +2516,8 @@ bool CConnman::Start(CScheduler& scheduler, const Options& connOptions)
|
|
|
|
|
Init(connOptions);
|
|
|
|
|
|
|
|
|
|
if (fListen && !InitBinds(connOptions)) {
|
|
|
|
|
if (clientInterface) {
|
|
|
|
|
clientInterface->ThreadSafeMessageBox(
|
|
|
|
|
if (m_client_interface) {
|
|
|
|
|
m_client_interface->ThreadSafeMessageBox(
|
|
|
|
|
_("Failed to listen on any port. Use -listen=0 if you want this."),
|
|
|
|
|
"", CClientUIInterface::MSG_ERROR);
|
|
|
|
|
}
|
|
|
|
@ -2534,8 +2534,8 @@ bool CConnman::Start(CScheduler& scheduler, const Options& connOptions)
|
|
|
|
|
AddAddrFetch(strDest);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (clientInterface) {
|
|
|
|
|
clientInterface->InitMessage(_("Loading P2P addresses…").translated);
|
|
|
|
|
if (m_client_interface) {
|
|
|
|
|
m_client_interface->InitMessage(_("Loading P2P addresses…").translated);
|
|
|
|
|
}
|
|
|
|
|
// Load addresses from peers.dat
|
|
|
|
|
int64_t nStart = GetTimeMillis();
|
|
|
|
@ -2559,8 +2559,8 @@ bool CConnman::Start(CScheduler& scheduler, const Options& connOptions)
|
|
|
|
|
LogPrintf("%i block-relay-only anchors will be tried for connections.\n", m_anchors.size());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (clientInterface) {
|
|
|
|
|
clientInterface->InitMessage(_("Starting network threads…").translated);
|
|
|
|
|
if (m_client_interface) {
|
|
|
|
|
m_client_interface->InitMessage(_("Starting network threads…").translated);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fAddressesInitialized = true;
|
|
|
|
@ -2599,8 +2599,8 @@ bool CConnman::Start(CScheduler& scheduler, const Options& connOptions)
|
|
|
|
|
threadOpenAddedConnections = std::thread(&util::TraceThread, "addcon", [this] { ThreadOpenAddedConnections(); });
|
|
|
|
|
|
|
|
|
|
if (connOptions.m_use_addrman_outgoing && !connOptions.m_specified_outgoing.empty()) {
|
|
|
|
|
if (clientInterface) {
|
|
|
|
|
clientInterface->ThreadSafeMessageBox(
|
|
|
|
|
if (m_client_interface) {
|
|
|
|
|
m_client_interface->ThreadSafeMessageBox(
|
|
|
|
|
_("Cannot provide specific connections and have addrman find outgoing connections at the same."),
|
|
|
|
|
"", CClientUIInterface::MSG_ERROR);
|
|
|
|
|
}
|
|
|
|
|