aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2015-11-14 05:14:15 -0800
committerGregory Maxwell <greg@xiph.org>2015-11-14 05:23:00 -0800
commitb632145edeb376b4d1597f192ca00634f7d2866c (patch)
tree9d7b3565c2a09d1a3e138cff9c2f640517a13c16 /src/main.cpp
parent9ffc687288dda3688d8d8e8ab95e612d47bac418 (diff)
parentbbf49da408a609a4ca9ed4028fa3071dc6e77233 (diff)
downloadbitcoin-b632145edeb376b4d1597f192ca00634f7d2866c.tar.xz
Merge pull request #6993
bbf49da Fix comment for blocksonly parameter interactions (Patick Strateman) 6a4982f Fix fRelayTxs comment (Patick Strateman) 59441a0 Display DEFAULT_WHITELISTALWAYSRELAY in help text (Patick Strateman) 71a2683 Use DEFAULT_BLOCKSONLY and DEFAULT_WHITELISTALWAYSRELAY constants (Patick Strateman) 762b13b Add help text for blocksonly and whitelistalwaysrelay (Patick Strateman) 3a96497 Add whitelistalwaysrelay option (Patick Strateman) 420fa81 Do not process tx inv's in blocksonly mode (Patick Strateman) 4044f07 Add blocksonly mode (Patick Strateman)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 4647112d4c..9fca183bb0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4219,7 +4219,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
bool fAlreadyHave = AlreadyHave(inv);
LogPrint("net", "got inv: %s %s peer=%d\n", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom->id);
- if (!fAlreadyHave && !fImporting && !fReindex && inv.type != MSG_BLOCK)
+ if (!fAlreadyHave && !fImporting && !fReindex && inv.type != MSG_BLOCK && !GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY))
pfrom->AskFor(inv);
if (inv.type == MSG_BLOCK) {
@@ -4466,7 +4466,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
assert(recentRejects);
recentRejects->insert(tx.GetHash());
- if (pfrom->fWhitelisted) {
+ if (pfrom->fWhitelisted && GetBoolArg("-whitelistalwaysrelay", DEFAULT_WHITELISTALWAYSRELAY)) {
// Always relay transactions received from whitelisted peers, even
// if they were rejected from the mempool, allowing the node to
// function as a gateway for nodes hidden behind it.