-
Notifications
You must be signed in to change notification settings - Fork 418
Use bitcoin::constants::COINBASE_MATURITY
#1727
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
Use bitcoin::constants::COINBASE_MATURITY
#1727
Conversation
|
|
||
| /// How many confirmations are needed f or a coinbase output to be spent. | ||
| pub const COINBASE_MATURITY: u32 = 100; | ||
|
|
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.
This was a public method and removing it breaks the public API.
Could you add pub use bitcoin::constants::COINBASE_MATURITY in the top of this file?
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.
I am unsure if stylistic or for another reason, but BDK does not export types via pub use anywhere else in the crate. What do you think @notmandatory @ValuedMammal
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.
Although it's a breaking change on the API, it's fixing the API and you can use it from rust-bitcoin (e.g. bdk_chain::bitcoin::constants::COINBASE_MATURITY), which is re-exported.
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.
I agree this is a breaking change, but it's OK to require downstream projects to switch to explicitly use bdk_chain::bitcoin::constants::COINBASE_MATURITY since we'll be rolling this out in the 1.0.0 major release.
oleonardolima
left a comment
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.
utACK 3869705
oleonardolima
left a comment
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.
After answering the comment above I noticed it, and I guess you'd need to update the commit message to fix(wallet, chain)!: ... instead.
3869705 to
309a607
Compare
notmandatory
left a comment
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 309a607
oleonardolima
left a comment
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 309a607
Closes #1692
All Submissions:
cargo fmtandcargo clippybefore committingNew Features:
Bugfixes: