From 9e80d128c0796e2c56e0b04e96f59a5e578069f1 Mon Sep 17 00:00:00 2001 From: pasta Date: Thu, 1 Aug 2024 09:23:09 -0500 Subject: [PATCH] Merge #6163: fix: use blocks-only instead of address-only for inventory 3468ab34d1f15bc90eca3d258493bd48a6a0952e fix: use blocks-only instead of address-only for inventory (Konstantin Akimov) Pull request description: ## Issue being fixed or feature implemented Mobile client (without full blockchain) can't receive transactions before they are mined in the block. ## What was done? Fixed a condition "is an addr relay" to "not a block relay". It's an alternate solution for https://github.com/dashpay/dash/pull/6162 ## How Has This Been Tested? Tested with hashengineering - it works! ## Breaking Changes N/A ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone ACKs for top commit: PastaPastaPasta: utACK [3468ab3](https://github.com/dashpay/dash/pull/6163/commits/3468ab34d1f15bc90eca3d258493bd48a6a0952e); no diff kwvg: utACK 3468ab34d1f15bc90eca3d258493bd48a6a0952e Tree-SHA512: 6ad257a72be0f2fd4d7a8e3674d537e2a2c5f0c7c1bdfdf825403d8cb2975261bcf4574949fb02a16de76762d3f30b40e094be448cfa4ee6bae9f1f5be5f44d5 --- src/net_processing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 6511ed614b..d0cd8c7f36 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2592,7 +2592,7 @@ void PeerManagerImpl::ProcessGetData(CNode& pfrom, Peer& peer, const std::atomic } ++it; - if (!peer.m_addr_relay_enabled && NetMessageViolatesBlocksOnly(inv.GetCommand())) { + if (peer.m_block_relay_only && NetMessageViolatesBlocksOnly(inv.GetCommand())) { // Note that if we receive a getdata for non-block messages // from a block-relay-only outbound peer that violate the policy, // we skip such getdata messages from this peer