Ignore getheaders requests when not synced #6172

pull sdaftuar wants to merge 1 commits into bitcoin:master from sdaftuar:fix-getheaders-response-when-syncing changing 1 files +3 −0
  1. sdaftuar commented at 6:29 pm on May 21, 2015: member
    Sending headers suggests to our peers that they can download from us, so don’t respond to getheaders requests while in initial block download (just as we don’t relay blocks on tip updates either).
  2. laanwj added the label P2P on May 21, 2015
  3. sdaftuar force-pushed on May 22, 2015
  4. laanwj commented at 9:04 am on May 24, 2015: member
    utACK
  5. in src/main.cpp: in 310ddb1a8a outdated
    4173@@ -4174,6 +4174,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
    4174 
    4175         LOCK(cs_main);
    4176 
    4177+        if (IsInitialBlockDownload()) return true;
    


    Diapolo commented at 5:43 pm on May 24, 2015:
    I hope we soon and finally apply the clang-format ;).

    laanwj commented at 8:04 am on May 27, 2015:
    Yes, it’s completely inconsequential, but pedantically the return true should be on the next line and indented.
  6. morcos commented at 9:06 pm on May 24, 2015: member
    Tested ACK
  7. Ignore getheaders requests when not synced. a1ba0778dd
  8. sdaftuar force-pushed on May 27, 2015
  9. sdaftuar commented at 4:21 pm on May 27, 2015: member
    Fixed nit
  10. laanwj commented at 4:33 pm on June 1, 2015: member
    Needs to be backported to 0.11 at least
  11. laanwj added this to the milestone 0.11.0 on Jun 1, 2015
  12. laanwj merged this on Jun 2, 2015
  13. laanwj closed this on Jun 2, 2015

  14. laanwj referenced this in commit 88a7ead5de on Jun 2, 2015
  15. laanwj referenced this in commit b4bbad18ef on Jun 2, 2015
  16. rebroad commented at 8:13 pm on June 8, 2015: contributor
    Shouldn’t we still send headers for the blocks we have?
  17. sdaftuar commented at 1:31 pm on June 10, 2015: member
    @rebroad Please see related comment here: #5927 (comment). Before IBD has finished, it’s possible to be on a chain that would violate a checkpoint, and responding to a getheaders request at that point could then cause an honest peer to disconnect.
  18. rebroad referenced this in commit 22a4a4fd5c on Nov 2, 2016
  19. rebroad referenced this in commit f5b82fe0bb on Nov 2, 2016
  20. rebroad referenced this in commit f032d43aa0 on Nov 2, 2016
  21. rebroad referenced this in commit 7f68d44c58 on Nov 2, 2016
  22. rebroad referenced this in commit 83d40a910f on Nov 2, 2016
  23. rebroad commented at 5:14 am on November 4, 2016: contributor
    https://botbot.me/freenode/bitcoin-core-dev/msg/75840350/ @gmaxwell your comment recently is MORE applicable here…
  24. rebroad referenced this in commit cc61ff61ea on Nov 4, 2016
  25. rebroad referenced this in commit e58dcdd7ce on Nov 5, 2016
  26. rebroad referenced this in commit 6c0f1ba60f on Nov 5, 2016
  27. rebroad referenced this in commit 0ec255a812 on Nov 6, 2016
  28. rebroad referenced this in commit 65a43abf3a on Nov 6, 2016
  29. rebroad referenced this in commit ec7fac9a23 on Nov 6, 2016
  30. pyritepirate referenced this in commit 94831ea0c7 on Jan 25, 2019
  31. reddink referenced this in commit 4f33c94dd8 on Aug 14, 2020
  32. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-19 09:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me