Skip to content

Commit 78f64ef

Browse files
rubensayshilaanwj
authored andcommitted
don't trickle for whitelisted nodes
Rebased-From: fc72020 Github-Pull: bitcoin#5942
1 parent a316622 commit 78f64ef

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
@@ -179,7 +179,12 @@ bool LoadBlockIndex();
179179
void UnloadBlockIndex();
180180
/** Process protocol messages received from a given node */
181181
bool ProcessMessages(CNode* pfrom);
182-
/** Send queued protocol messages to be sent to a give node */
182+
/**
183+
* Send queued protocol messages to be sent to a give node.
184+
*
185+
* @param[in] pto The node which we are sending messages to.
186+
* @param[in] fSendTrickle When true send the trickled data, otherwise trickle the data until true.
187+
*/
183188
bool SendMessages(CNode* pto, bool fSendTrickle);
184189
/** Run an instance of the script checking thread */
185190
void ThreadScriptCheck();

src/net.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1456,7 +1456,7 @@ void ThreadMessageHandler()
14561456
{
14571457
TRY_LOCK(pnode->cs_vSend, lockSend);
14581458
if (lockSend)
1459-
g_signals.SendMessages(pnode, pnode == pnodeTrickle);
1459+
g_signals.SendMessages(pnode, pnode == pnodeTrickle || pnode->fWhitelisted);
14601460
}
14611461
boost::this_thread::interruption_point();
14621462
}

0 commit comments

Comments
 (0)