aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-05-21 08:58:57 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-05-21 09:00:25 -0400
commitcfe22a5f9e1d9e2d3dc8ce177e6c8eb04bc96615 (patch)
treec6ec97aad915b7fcb567d5fd7ed24461d4e1d11e /src
parent25ad2c623af30056ffb36dcd203a52edda2b170f (diff)
parent0ea5d70b4756f376342417e0019490233cb4a918 (diff)
downloadbitcoin-cfe22a5f9e1d9e2d3dc8ce177e6c8eb04bc96615.tar.xz
Merge #18530: Add test for -blocksonly and -whitelistforcerelay param interaction
0ea5d70b4756f376342417e0019490233cb4a918 Updated comment for the condition where a transaction relay is denied (glowang) be01449cc8eb7bb97531a967f5d1dcc7b8865d1e Add test for param interaction b/w -blocksonly and -whitelistforcerelay (glowang) Pull request description: Related to: #18428 When -blocksonly is turned on, a node would still relay transactions from whitelisted peers. This funcitonality has not been tested. ACKs for top commit: MarcoFalke: ACK 0ea5d70b4756f376342417e0019490233cb4a918 Tree-SHA512: 4e99c88281cb518cc67f5f3be7171a7b413933047b5d24a04bb3ff2210a82e914d69079f64cd5bac9206ec435e21a622c8e69cedbc2ccb39d2328ac5c01668e5
Diffstat (limited to 'src')
-rw-r--r--src/net_processing.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 6d85b46831..018541a597 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -2675,8 +2675,8 @@ bool ProcessMessage(CNode* pfrom, const std::string& msg_type, CDataStream& vRec
if (msg_type == NetMsgType::TX) {
// Stop processing the transaction early if
- // We are in blocks only mode and peer is either not whitelisted or whitelistrelay is off
- // or if this peer is supposed to be a block-relay-only peer
+ // 1) We are in blocks only mode and peer has no relay permission
+ // 2) This peer is a block-relay-only peer
if ((!g_relay_txes && !pfrom->HasPermission(PF_RELAY)) || (pfrom->m_tx_relay == nullptr))
{
LogPrint(BCLog::NET, "transaction sent in violation of protocol peer=%d\n", pfrom->GetId());