Skip to content

Commit

Permalink
Merge #6163: fix: use blocks-only instead of address-only for inventory
Browse files Browse the repository at this point in the history
3468ab3 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 #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](3468ab3); no diff
  kwvg:
    utACK 3468ab3

Tree-SHA512: 6ad257a72be0f2fd4d7a8e3674d537e2a2c5f0c7c1bdfdf825403d8cb2975261bcf4574949fb02a16de76762d3f30b40e094be448cfa4ee6bae9f1f5be5f44d5
  • Loading branch information
PastaPastaPasta committed Aug 1, 2024
2 parents 5901fd4 + 3468ab3 commit 2379462
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2589,7 +2589,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
Expand Down

0 comments on commit 2379462

Please sign in to comment.