This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Add a protocol that answers finality proofs#5718
Merged
tomaka merged 5 commits intoparitytech:masterfrom Apr 22, 2020
Merged
Conversation
6 tasks
twittner
reviewed
Apr 21, 2020
client/network/src/behaviour.rs
Outdated
| /// Block request handling. | ||
| block_requests: protocol::BlockRequests<B>, | ||
| /// Finality proof request handling. | ||
| finality_proof_requests: protocol::FinalityProofRequests<B>, |
Contributor
There was a problem hiding this comment.
Would it make sense to use Toggle<protocol::FinalityProofRequests<B>> here instead of storing an Option<Arc<dyn FinalityProofProvider<B>>> in FinalityProofRequests and erroring on incoming requests if it is a None?
Contributor
Author
There was a problem hiding this comment.
I went for keeping the current behaviour because I didn't know when the Option can be None. But I think it is None for light clients (which can't serve finality proofs) and Some for full nodes.
I'll do the change.
twittner
approved these changes
Apr 21, 2020
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.
cc #5670
This adds something that we forgot in #3520: finality proofs.
The code that this PR adds is mostly copy-pasted from
block_requests.rs(which is known to be working) and was trivial to adjust.