Send not_found for unservable get_data. - #1106
Open
echennells wants to merge 1 commit into
Open
Conversation
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The node stops the channel when a peer requests a block or transaction that it cannot serve. bitcoind replies
notfoundand stays connected. Implements #986.The node now replies and resumes the send loop at four sites: a hash that resolves to no header, a pruned block, a block that cannot be read from the archive, and an absent transaction. Each reply is sent from the send completion handler, as a block is, so nothing is produced until the prior write completes.
The hash that resolves to no header is tested first, because the checkpoint height query faults the store on a terminal link. Such a hash is ordinary peer input, so the query is no longer reached with one.
protocol_block_out_106is attached without a version condition, so its peer may be below bip37, wherenot_foundis undefined. It captures the negotiated level at construction and retains the existing stop below that level.protocol_transaction_out_106is attached only above bip37, so the level is asserted there.A request is already bounded by
max_inventoryat deserialization, so no additional limit is imposed.Four cases cover the block sites, including a peer below bip37. The transaction site awaits a fixture that negotiates relay.