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

Enable end of the lookup if value is found #25

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

cortze
Copy link
Owner

@cortze cortze commented Aug 24, 2023

Motivation

As the lookup function is used to get i) the closest peers to a hash, and ii) find a given value, there is a need to define whether the lookup should keep looking up if the value for the given hash is found.

Description

This PR modifies the lookup method call enabling it to break on value or not (break on k closest nodes)

Tasks

  • Add a boolean flag that enables or disables the `finishonfirstvalue

Proof of Success

  • test happy

@cortze cortze merged commit 66ef42d into main Aug 24, 2023
6 checks passed
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