Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

[NC-2268] Handle partial responses to get receipts requests #801

Merged
merged 10 commits into from
Feb 7, 2019

Conversation

ajsutton
Copy link
Contributor

@ajsutton ajsutton commented Feb 7, 2019

PR description

When requesting receipts for blocks, the remote peer may only return a subset of the requested receipts and we then need to send an additional request for the remaining receipts.

Also removes the restriction on AbstractRetryingPeerTask that it return a List of data - this was only required so it could check for empty responses so a Predicate is now passed in to enable that check with a completely generic type and GetReceiptsForHeadersTask can then return a Map of header to receipts.

And as a bonus, it turns out the new GetReceiptsForHeaders that handles the retrying is also the perfect place to handle headers with empty receipt roots so we can avoid requesting them over the network.

@ajsutton ajsutton merged commit 25febe2 into PegaSysEng:master Feb 7, 2019
@ajsutton ajsutton deleted the handle-incomplete-receipts-reply branch February 7, 2019 21:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants