aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2016-05-26 14:52:05 +0200
committerPieter Wuille <[email protected]>2016-05-26 15:02:16 +0200
commitc028c7b7557da2baff7af8840108e8be4db8e0c6 (patch)
tree89d5448cf5ddc26fa2232e8aa68714a722868fc5 /src/main.cpp
parentMerge #8015: CCoinsViewErrorCatcher raison-d-etre (diff)
parentrpc: Add `relaytxes` flag to `getnetworkinfo` (diff)
downloaddiscoin-c028c7b7557da2baff7af8840108e8be4db8e0c6.tar.xz
discoin-c028c7b7557da2baff7af8840108e8be4db8e0c6.zip
Merge #8049: Expose information on whether transaction relay is enabled in `getnetwork`
1ab1dc3 rpc: Add `relaytxes` flag to `getnetworkinfo` (Wladimir J. van der Laan) 581ddff net: Add fRelayTxes flag (Wladimir J. van der Laan)
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 9a2ff8c2b..ed157b53d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4800,7 +4800,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
return error("message inv size() = %u", vInv.size());
}
- bool fBlocksOnly = GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY);
+ bool fBlocksOnly = !fRelayTxes;
// Allow whitelisted peers to send data other than blocks in blocks only mode if whitelistrelay is true
if (pfrom->fWhitelisted && GetBoolArg("-whitelistrelay", DEFAULT_WHITELISTRELAY))
@@ -4983,7 +4983,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
{
// Stop processing the transaction early if
// 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)))
+ if (!fRelayTxes && (!pfrom->fWhitelisted || !GetBoolArg("-whitelistrelay", DEFAULT_WHITELISTRELAY)))
{
LogPrint("net", "transaction sent in violation of protocol peer=%d\n", pfrom->id);
return true;