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

refactor: don't allow limit = 0 #20

Merged
merged 1 commit into from
Apr 4, 2024
Merged

Conversation

yangby-cryptape
Copy link
Contributor

Description

Personally, I feel 0 means no limit is a bit special. Without special treatment, it should mean forbidden.

Another way to change(for reference only)

storage.generate_spv_client_and_spv_update(spv_tip_height, None)? ;
  if let Some(limit) = limit {
      tip_height = std::cmp::min(tip_height, prev_height.saturating_add(limit));
  }

Originally posted by @EthanYuan in #14 (comment)

@yangby-cryptape yangby-cryptape marked this pull request as ready for review April 3, 2024 08:39
@yangby-cryptape yangby-cryptape added this pull request to the merge queue Apr 4, 2024
Merged via the queue into master with commit ba3f652 Apr 4, 2024
5 checks passed
@yangby-cryptape yangby-cryptape deleted the refactor/nonzero-limit branch April 4, 2024 04:11
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.

3 participants