Ignore getheaders requests when not synced#6172
Merged
laanwj merged 1 commit intobitcoin:masterfrom Jun 2, 2015
Merged
Conversation
892bfc7 to
310ddb1
Compare
Member
|
utACK |
src/main.cpp
Outdated
There was a problem hiding this comment.
I hope we soon and finally apply the clang-format ;).
Member
There was a problem hiding this comment.
Yes, it's completely inconsequential, but pedantically the return true should be on the next line and indented.
Contributor
|
Tested ACK |
310ddb1 to
a1ba077
Compare
Member
Author
|
Fixed nit |
Member
|
Needs to be backported to 0.11 at least |
laanwj
added a commit
that referenced
this pull request
Jun 2, 2015
a1ba077 Ignore getheaders requests when not synced. (Suhas Daftuar)
Contributor
|
Shouldn't we still send headers for the blocks we have? |
Member
Author
|
@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. |
rebroad
added a commit
to rebroad/bitcoin
that referenced
this pull request
Nov 2, 2016
An improvement over bitcoin#6172. Fixes bitcoin#6971 rather than bypasses it as bitcoin#6974 did, and reduces overloading of whitelisting.
Contributor
|
https://botbot.me/freenode/bitcoin-core-dev/msg/75840350/ @gmaxwell your comment recently is MORE applicable here... |
pyritepirate
referenced
this pull request
in pyritepirate/pyrite
Jan 25, 2019
reddink
pushed a commit
to reddcoin-project/reddcoin-3.10
that referenced
this pull request
Aug 14, 2020
Rebased-From: a1ba077 Github-Pull: bitcoin#6172 (cherry picked from commit b4bbad1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).