-
Notifications
You must be signed in to change notification settings - Fork 405
refactor(electrum): remove unwrap()
s and expect()
s
#1981
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(electrum): remove unwrap()
s and expect()
s
#1981
Conversation
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.
Thank you for looking into this! One comment.
4c3254b
to
4277bfe
Compare
4277bfe
to
e3e4939
Compare
I created a commit on top which cleans up some of the logic so that we return a more explicit error when we cannot find a point of agreement (a.k.a. wrong network): 7c1cc80. Feel free to cherry-pick this across if you find that it is appropriate. I think it would make sense to include a sync-with-wrong-network test to make sure we hit this error. |
e3e4939
to
0fdbe9d
Compare
612afa2
to
b24ae6d
Compare
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.
ACK b24ae6d
Partially resolves bitcoindevkit/bdk_wallet#30.
Description
This PR eliminates all
unwrap()
andexpect()
calls frombdk_electrum_client
, replacing them with proper error handling. Given that all public methods already returnResult
, we now propagate error messages instead of panicking.Changelog notice
unwrap()
s andexpect()
s frombdk_electrum_client.rs
.Checklists
All Submissions:
cargo +nightly fmt
andcargo clippy
before committing