mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
Merge pull request #6993
bbf49daFix comment for blocksonly parameter interactions (Patick Strateman)6a4982fFix fRelayTxs comment (Patick Strateman)59441a0Display DEFAULT_WHITELISTALWAYSRELAY in help text (Patick Strateman)71a2683Use DEFAULT_BLOCKSONLY and DEFAULT_WHITELISTALWAYSRELAY constants (Patick Strateman)762b13bAdd help text for blocksonly and whitelistalwaysrelay (Patick Strateman)3a96497Add whitelistalwaysrelay option (Patick Strateman)420fa81Do not process tx inv's in blocksonly mode (Patick Strateman)4044f07Add blocksonly mode (Patick Strateman)
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user