Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract validation from ProtocolMessenger #741

Merged
merged 2 commits into from
Aug 17, 2021

Conversation

aschmahmann
Copy link
Contributor

@aschmahmann aschmahmann commented Aug 11, 2021

Validation being done inside the ProtocolMessenger was a bit annoying for anyone trying to utilize the protocol messages more directly (debugging, making an alternative client, etc.).

Additionally, this fixes a bug where even though WithValidation appeared optional the ProtocolMessenger actually panicked if you didn't pass one in and called GetValue().

Comment on lines -599 to -600
// GetValues gets nvals values corresponding to the given key.
func (dht *FullRT) GetValues(ctx context.Context, key string, nvals int) (_ []RecvdVal, err error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Killed because it was killed in the IpfsDHT implementation and generally isn't very useful #728

@aschmahmann aschmahmann marked this pull request as ready for review August 12, 2021 18:59
@marten-seemann marten-seemann mentioned this pull request Aug 16, 2021
37 tasks
@aschmahmann aschmahmann merged commit 7a8aeb6 into master Aug 17, 2021
@aschmahmann aschmahmann deleted the feat/refactor-get-values branch August 17, 2021 17:33
@aschmahmann aschmahmann mentioned this pull request Aug 23, 2021
62 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant