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

fix: handle parsing and network errors in address new #417

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

reez
Copy link
Collaborator

@reez reez commented Nov 16, 2023

Description

Fixes "TODO 11".

Instead of panicking if the parsing fails, handle the error by propagating; avoids panicking and allows the caller of Address::new to handle the BdkError as necessary.

Notes to the reviewers

Already using the ? operator so it seemed more idiomatic to continue with this style (instead of match), but open to changing this if needed.

Changelog notice

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

@reez reez marked this pull request as ready for review November 16, 2023 16:26
@reez reez requested a review from thunderbiscuit November 16, 2023 19:13
Copy link
Member

@thunderbiscuit thunderbiscuit left a comment

Choose a reason for hiding this comment

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

ACK e79ce98.

@thunderbiscuit thunderbiscuit merged commit e79ce98 into bitcoindevkit:master Nov 17, 2023
17 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.

2 participants