Skip to content

Conversation

@theStack
Copy link
Contributor

@theStack theStack commented Sep 3, 2023

This simple PR adds missing test coverage for ignoring repeated getaddr requests (introduced in #7856, commit 66b0724):

bitcoin/src/net_processing.cpp

Lines 4642 to 4648 in 6f03c45

// Only send one GetAddr response per connection to reduce resource waste
// and discourage addr stamping of INV announcements.
if (peer->m_getaddr_recvd) {
LogPrint(BCLog::NET, "Ignoring repeated \"getaddr\". peer=%d\n", pfrom.GetId());
return;
}
peer->m_getaddr_recvd = true;

@DrahtBot
Copy link
Contributor

DrahtBot commented Sep 3, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK MarcoFalke, brunoerg

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@DrahtBot DrahtBot added the Tests label Sep 3, 2023
@maflcko
Copy link
Member

maflcko commented Sep 3, 2023

lgtm ACK 668aa6a

Copy link
Contributor

@brunoerg brunoerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crACK 668aa6a

@DrahtBot DrahtBot removed the CI failed label Sep 5, 2023
@fanquake fanquake merged commit fb619e1 into bitcoin:master Sep 5, 2023
@theStack theStack deleted the 202309-test-add_ignore_repeated_getaddr_coverage branch September 5, 2023 09:30
Frank-GER pushed a commit to syscoin/syscoin that referenced this pull request Sep 8, 2023
…sponded once per connection

668aa6a test: p2p: check that `getaddr` msgs are only responded once per connection (Sebastian Falbesoner)

Pull request description:

  This simple PR adds missing test coverage for ignoring repeated `getaddr` requests (introduced in bitcoin#7856, commit 66b0724):
  https://github.com/bitcoin/bitcoin/blob/6f03c45f6bb5a6edaa3051968b6a1ca4f84d2ccb/src/net_processing.cpp#L4642-L4648

ACKs for top commit:
  MarcoFalke:
    lgtm ACK 668aa6a
  brunoerg:
    crACK 668aa6a

Tree-SHA512: edcdc6501c684fb41911e393f55ded9b044cd2f92918877eca152edd5a4287d1a9d57ae999f1cb42185eae00c3a0af411fcb9bcd5b990ef48849c3834b141584
@bitcoin bitcoin locked and limited conversation to collaborators Sep 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants