aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-02-01 14:10:11 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2016-02-01 14:11:15 +0100
commit58a8574400c6673cfac91c7acecc193158d76093 (patch)
tree95a166a16b9d40c5151e903bbd4f419898c279cb /src/main.cpp
parent31ec14b74ba34001f764a419508b1f61dec4291d (diff)
parent89d113e02a83617b4e971c160d47551476dacc71 (diff)
Merge #7439: Add whitelistforcerelay to control forced relaying. [#7099 redux]
89d113e Blacklist -whitelistalwaysrelay; replaced by -whitelistrelay. (Gregory Maxwell) 325c725 Add whitelistforcerelay to control forced relaying. (Gregory Maxwell)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 604269f291..bc7b0daaf9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4476,8 +4476,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
bool fBlocksOnly = GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY);
- // Allow whitelisted peers to send data other than blocks in blocks only mode if whitelistalwaysrelay is true
- if (pfrom->fWhitelisted && GetBoolArg("-whitelistalwaysrelay", DEFAULT_WHITELISTALWAYSRELAY))
+ // Allow whitelisted peers to send data other than blocks in blocks only mode if whitelistrelay is true
+ if (pfrom->fWhitelisted && GetBoolArg("-whitelistrelay", DEFAULT_WHITELISTRELAY))
fBlocksOnly = false;
LOCK(cs_main);
@@ -4656,8 +4656,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
else if (strCommand == NetMsgType::TX)
{
// Stop processing the transaction early if
- // We are in blocks only mode and peer is either not whitelisted or whitelistalwaysrelay is off
- if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY) && (!pfrom->fWhitelisted || !GetBoolArg("-whitelistalwaysrelay", DEFAULT_WHITELISTALWAYSRELAY)))
+ // We are in blocks only mode and peer is either not whitelisted or whitelistrelay is off
+ if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY) && (!pfrom->fWhitelisted || !GetBoolArg("-whitelistrelay", DEFAULT_WHITELISTRELAY)))
{
LogPrint("net", "transaction sent in violation of protocol peer=%d\n", pfrom->id);
return true;
@@ -4757,7 +4757,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
assert(recentRejects);
recentRejects->insert(tx.GetHash());
- if (pfrom->fWhitelisted && GetBoolArg("-whitelistalwaysrelay", DEFAULT_WHITELISTALWAYSRELAY)) {
+ if (pfrom->fWhitelisted && GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY)) {
// Always relay transactions received from whitelisted peers, even
// if they were already in the mempool or rejected from it due
// to policy, allowing the node to function as a gateway for