-
Notifications
You must be signed in to change notification settings - Fork 831
Added regtest network #84
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
Conversation
Hello guys. Unfortunately, I can't create them until this regtest PR is merged. Could you please give me some feedback, if there is something wrong with this PR? |
As I wrote before: I do not support panic! in this library. It is fine to fail an application in an unrecoverable state, but a library should rather propagate errors via Result<> |
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.
remove panic. propagate errors if needed.
src/util/address.rs
Outdated
@@ -162,7 +162,8 @@ impl Address { | |||
fn bech_network (network: Network) -> bitcoin_bech32::constants::Network { | |||
match network { | |||
Network::Bitcoin => bitcoin_bech32::constants::Network::Bitcoin, | |||
Network::Testnet => bitcoin_bech32::constants::Network::Testnet | |||
Network::Testnet => bitcoin_bech32::constants::Network::Testnet, | |||
_ => panic!("Invalid network to be converted"), |
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.
Please do not panic, here. Better cover all cases or propagate error. This is a library not an application that might chose to fail early.
@popzxc I am sorry, I just recognized that github does not show my feedback in a review until the review is marked finished. Therefore you did not see my feedback I provided a few days ago until now. |
That's ok. I'll fix that in a few days :) |
Well, generally Another solution will cause more changes: e.g. method |
Please clean up the history. |
Completed regtest integration to the code Added tests for regtest Get rid of panics
Done. |
ACK |
See #94 -- this will need to be reverted and moved to 0.14. Sorry about that. |
Maybe then just reorder commits in such way that this feature will be after the commit that'll be marked as 0.13.2? Just for those people who possibly already use this feature. |
We can't reorder commits in |
Ok then. |
No description provided.