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

Cancel download and verify tasks when the mempool is deactivated #2629

Closed
Tracked by #2309
mpguerra opened this issue Aug 13, 2021 · 1 comment · Fixed by #2764
Closed
Tracked by #2309

Cancel download and verify tasks when the mempool is deactivated #2629

mpguerra opened this issue Aug 13, 2021 · 1 comment · Fixed by #2764
Assignees
Labels
C-enhancement Category: This is an improvement

Comments

@mpguerra
Copy link
Contributor

mpguerra commented Aug 13, 2021

Motivation

If Zebra's network connection is interrupted for a long time, we'll want to deactivate the mempool while we're catching up to the new tip.

Designs

The download and verify service can call SyncStatus::is_close_to_tip to check if the mempool is inactive:

/// Check if the synchronization is likely close to the chain tip.
pub fn is_close_to_tip(&self) -> bool {

If the mempool is inactive, it needs to:

  • cancel all downloads
  • cancel all verifications
  • return None to the caller
@mpguerra mpguerra mentioned this issue Aug 13, 2021
59 tasks
@mpguerra mpguerra added C-enhancement Category: This is an improvement S-needs-triage Status: A bug report needs triage labels Aug 13, 2021
@mpguerra mpguerra added this to the 2021 Sprint 19 milestone Aug 26, 2021
@mpguerra
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: This is an improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants