Skip to content

Commit fc72020

Browse files
committed
don't trickle for whitelisted nodes
1 parent 2afd919 commit fc72020

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/main.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,12 @@ bool LoadBlockIndex();
177177
void UnloadBlockIndex();
178178
/** Process protocol messages received from a given node */
179179
bool ProcessMessages(CNode* pfrom);
180-
/** Send queued protocol messages to be sent to a give node */
180+
/**
181+
* Send queued protocol messages to be sent to a give node.
182+
*
183+
* @param[in] pto The node which we are sending messages to.
184+
* @param[in] fSendTrickle When true send the trickled data, otherwise trickle the data until true.
185+
*/
181186
bool SendMessages(CNode* pto, bool fSendTrickle);
182187
/** Run an instance of the script checking thread */
183188
void ThreadScriptCheck();

src/net.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,7 @@ void ThreadMessageHandler()
14061406
{
14071407
TRY_LOCK(pnode->cs_vSend, lockSend);
14081408
if (lockSend)
1409-
g_signals.SendMessages(pnode, pnode == pnodeTrickle);
1409+
g_signals.SendMessages(pnode, pnode == pnodeTrickle || pnode->fWhitelisted);
14101410
}
14111411
boost::this_thread::interruption_point();
14121412
}

0 commit comments

Comments
 (0)