Skip to content

Commit

Permalink
net: use the exposed GetNodeSignals() rather than g_signals directly
Browse files Browse the repository at this point in the history
  • Loading branch information
theuni authored and Fuzzbawls committed Jun 23, 2020
1 parent 7962bcc commit 9fd357d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ bool CNode::DisconnectOldProtocol(int nVersionRequired, std::string strLastComma

void CNode::PushVersion()
{
int nBestHeight = g_signals.GetHeight().get_value_or(0);
int nBestHeight = GetNodeSignals().GetHeight().get_value_or(0);

/// when NTP implemented, change to just nTime = GetAdjustedTime()
int64_t nTime = (fInbound ? GetAdjustedTime() : GetTime());
Expand Down Expand Up @@ -1782,7 +1782,7 @@ void ThreadMessageHandler()
{
TRY_LOCK(pnode->cs_vRecvMsg, lockRecv);
if (lockRecv) {
if (!g_signals.ProcessMessages(pnode))
if (!GetNodeSignals().ProcessMessages(pnode))
pnode->CloseSocketDisconnect();

if (pnode->nSendSize < SendBufferSize()) {
Expand All @@ -1798,7 +1798,7 @@ void ThreadMessageHandler()
{
TRY_LOCK(pnode->cs_vSend, lockSend);
if (lockSend)
g_signals.SendMessages(pnode, pnode == pnodeTrickle || pnode->fWhitelisted);
GetNodeSignals().SendMessages(pnode, pnode == pnodeTrickle || pnode->fWhitelisted);
}
boost::this_thread::interruption_point();
}
Expand Down

0 comments on commit 9fd357d

Please sign in to comment.