aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben de Vries <ruben@rubensayshi.com>2015-03-24 14:29:13 +0100
committerRuben de Vries <ruben@rubensayshi.com>2015-03-24 14:53:16 +0100
commitfc720207e0e513e531b1f266b966a2ffa57b936a (patch)
tree5a052f2dfb5d07cec3c948ca57e3b5c9d8fc0312
parent2afd919f212e8499d5549e29ac9b8a2d825873d9 (diff)
don't trickle for whitelisted nodes
-rw-r--r--src/main.h7
-rw-r--r--src/net.cpp2
2 files changed, 7 insertions, 2 deletions
diff --git a/src/main.h b/src/main.h
index 936cd43e99..65693b44b7 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 0723ee218a..11c2cd07d9 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();
}