From fc720207e0e513e531b1f266b966a2ffa57b936a Mon Sep 17 00:00:00 2001 From: Ruben de Vries Date: Tue, 24 Mar 2015 14:29:13 +0100 Subject: [PATCH] don't trickle for whitelisted nodes --- src/main.h | 7 ++++++- src/net.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.h b/src/main.h index 936cd43e9..65693b44b 100644 --- a/src/main.h +++ b/src/main.h @@ -177,7 +177,12 @@ bool LoadBlockIndex(); void UnloadBlockIndex(); /** Process protocol messages received from a given node */ bool ProcessMessages(CNode* pfrom); -/** Send queued protocol messages to be sent to a give node */ +/** + * Send queued protocol messages to be sent to a give node. + * + * @param[in] pto The node which we are sending messages to. + * @param[in] fSendTrickle When true send the trickled data, otherwise trickle the data until true. + */ bool SendMessages(CNode* pto, bool fSendTrickle); /** Run an instance of the script checking thread */ void ThreadScriptCheck(); diff --git a/src/net.cpp b/src/net.cpp index 0723ee218..11c2cd07d 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1406,7 +1406,7 @@ void ThreadMessageHandler() { TRY_LOCK(pnode->cs_vSend, lockSend); if (lockSend) - g_signals.SendMessages(pnode, pnode == pnodeTrickle); + g_signals.SendMessages(pnode, pnode == pnodeTrickle || pnode->fWhitelisted); } boost::this_thread::interruption_point(); }