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

[NC-2129] Add GetNodeDataFromPeerTask #597

Merged
merged 1 commit into from
Jan 18, 2019
Merged

Conversation

ajsutton
Copy link
Contributor

PR description

Adds GetNodeDataFromPeerTask that requests node data from a peer and matches up the results.

Fixed Issue(s)

NC-2129

return Optional.empty();
}

if (nodeData.stream().anyMatch(data -> !hashes.contains(Hash.hash(data)))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be nice to save this hash calculation, so we get back a mapping from hash -> data. Just saves us from duplicative hash calculations if we're already going to do that here.

@mbaxter
Copy link
Contributor

mbaxter commented Jan 18, 2019

Going to go ahead and merge since I need this :)

@mbaxter mbaxter merged commit 2fa4cb9 into PegaSysEng:master Jan 18, 2019
@ajsutton
Copy link
Contributor Author

Ok, since it's merged I'll leave it with you to save the hash calculation if it's useful to the calling code. It should be pretty straight-forward.

@ajsutton ajsutton deleted the NC-2129 branch January 31, 2019 21:29
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