Skip to content

Commit d8ba632

Browse files
committed
scripted-diff: replace clientInterface with m_client_interface in net
-BEGIN VERIFY SCRIPT- sed -i -e "s/clientInterface/m_client_interface/g" src/net.cpp src/net.h -END VERIFY SCRIPT-
1 parent f68c6ce commit d8ba632

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

src/net.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,8 +1304,8 @@ void CConnman::NotifyNumConnectionsChanged()
13041304
}
13051305
if(vNodesSize != nPrevNodeCount) {
13061306
nPrevNodeCount = vNodesSize;
1307-
if (clientInterface) {
1308-
clientInterface->NotifyNumConnectionsChanged(vNodesSize);
1307+
if (m_client_interface) {
1308+
m_client_interface->NotifyNumConnectionsChanged(vNodesSize);
13091309
}
13101310
}
13111311
}
@@ -2449,8 +2449,8 @@ void CConnman::SetNetworkActive(bool active)
24492449

24502450
fNetworkActive = active;
24512451

2452-
if (clientInterface) {
2453-
clientInterface->NotifyNetworkActiveChanged(fNetworkActive);
2452+
if (m_client_interface) {
2453+
m_client_interface->NotifyNetworkActiveChanged(fNetworkActive);
24542454
}
24552455
}
24562456

@@ -2476,8 +2476,8 @@ bool CConnman::Bind(const CService &addr, unsigned int flags, NetPermissionFlags
24762476
}
24772477
bilingual_str strError;
24782478
if (!BindListenPort(addr, strError, permissions)) {
2479-
if ((flags & BF_REPORT_ERROR) && clientInterface) {
2480-
clientInterface->ThreadSafeMessageBox(strError, "", CClientUIInterface::MSG_ERROR);
2479+
if ((flags & BF_REPORT_ERROR) && m_client_interface) {
2480+
m_client_interface->ThreadSafeMessageBox(strError, "", CClientUIInterface::MSG_ERROR);
24812481
}
24822482
return false;
24832483
}
@@ -2516,8 +2516,8 @@ bool CConnman::Start(CScheduler& scheduler, const Options& connOptions)
25162516
Init(connOptions);
25172517

25182518
if (fListen && !InitBinds(connOptions)) {
2519-
if (clientInterface) {
2520-
clientInterface->ThreadSafeMessageBox(
2519+
if (m_client_interface) {
2520+
m_client_interface->ThreadSafeMessageBox(
25212521
_("Failed to listen on any port. Use -listen=0 if you want this."),
25222522
"", CClientUIInterface::MSG_ERROR);
25232523
}
@@ -2534,8 +2534,8 @@ bool CConnman::Start(CScheduler& scheduler, const Options& connOptions)
25342534
AddAddrFetch(strDest);
25352535
}
25362536

2537-
if (clientInterface) {
2538-
clientInterface->InitMessage(_("Loading P2P addresses…").translated);
2537+
if (m_client_interface) {
2538+
m_client_interface->InitMessage(_("Loading P2P addresses…").translated);
25392539
}
25402540
// Load addresses from peers.dat
25412541
int64_t nStart = GetTimeMillis();
@@ -2559,8 +2559,8 @@ bool CConnman::Start(CScheduler& scheduler, const Options& connOptions)
25592559
LogPrintf("%i block-relay-only anchors will be tried for connections.\n", m_anchors.size());
25602560
}
25612561

2562-
if (clientInterface) {
2563-
clientInterface->InitMessage(_("Starting network threads…").translated);
2562+
if (m_client_interface) {
2563+
m_client_interface->InitMessage(_("Starting network threads…").translated);
25642564
}
25652565

25662566
fAddressesInitialized = true;
@@ -2599,8 +2599,8 @@ bool CConnman::Start(CScheduler& scheduler, const Options& connOptions)
25992599
threadOpenAddedConnections = std::thread(&util::TraceThread, "addcon", [this] { ThreadOpenAddedConnections(); });
26002600

26012601
if (connOptions.m_use_addrman_outgoing && !connOptions.m_specified_outgoing.empty()) {
2602-
if (clientInterface) {
2603-
clientInterface->ThreadSafeMessageBox(
2602+
if (m_client_interface) {
2603+
m_client_interface->ThreadSafeMessageBox(
26042604
_("Cannot provide specific connections and have addrman find outgoing connections at the same."),
26052605
"", CClientUIInterface::MSG_ERROR);
26062606
}

src/net.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ class CConnman
787787
nMaxAddnode = connOptions.nMaxAddnode;
788788
nMaxFeeler = connOptions.nMaxFeeler;
789789
m_max_outbound = m_max_outbound_full_relay + m_max_outbound_block_relay + nMaxFeeler;
790-
clientInterface = connOptions.uiInterface;
790+
m_client_interface = connOptions.uiInterface;
791791
m_banman = connOptions.m_banman;
792792
m_msgproc = connOptions.m_msgproc;
793793
nSendBufferMaxSize = connOptions.nSendBufferMaxSize;
@@ -1126,7 +1126,7 @@ class CConnman
11261126
int nMaxFeeler;
11271127
int m_max_outbound;
11281128
bool m_use_addrman_outgoing;
1129-
CClientUIInterface* clientInterface;
1129+
CClientUIInterface* m_client_interface;
11301130
NetEventsInterface* m_msgproc;
11311131
/** Pointer to this node's banman. May be nullptr - check existence before dereferencing. */
11321132
BanMan* m_banman;

0 commit comments

Comments
 (0)