-
Notifications
You must be signed in to change notification settings - Fork 0
fix(sync): add cooperative hard-cancel support #2
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
base: pr-base-v0.30.3
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -130,6 +130,8 @@ pub enum Error { | |
| /// [`crate::blockchain::WalletSync`] sync attempt failed due to missing scripts in cache which | ||
| /// are needed to satisfy `stop_gap`. | ||
| MissingCachedScripts(MissingCachedScripts), | ||
| /// [`crate::blockchain::WalletSync`] sync was cancelled by cooperative control. | ||
| SyncCancelled, | ||
|
|
||
|
Comment on lines
130
to
135
|
||
| #[cfg(feature = "electrum")] | ||
| /// Electrum client error | ||
|
|
@@ -258,6 +260,7 @@ impl fmt::Display for Error { | |
| Self::MissingCachedScripts(missing_cached_scripts) => { | ||
| write!(f, "Missing cached scripts: {:?}", missing_cached_scripts) | ||
| } | ||
| Self::SyncCancelled => write!(f, "Wallet sync cancelled"), | ||
| #[cfg(feature = "electrum")] | ||
| Self::Electrum(err) => write!(f, "Electrum client error: {}", err), | ||
| #[cfg(feature = "esplora")] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The crate version is being bumped as a patch release, but this PR also changes the public API in a potentially breaking way (e.g.,
SyncOptionsgained a new field). If this is intended to be non-breaking, please avoid breaking public structs or bump the version according to the project's semver policy.