Skip to content

Conversation

@rustaceanrob
Copy link
Contributor

Closes #1692

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

@notmandatory notmandatory added audit Suggested as result of external code audit module-blockchain labels Nov 18, 2024
@notmandatory notmandatory added this to the 1.0.0-beta milestone Nov 18, 2024

/// How many confirmations are needed f or a coinbase output to be spent.
pub const COINBASE_MATURITY: u32 = 100;

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?

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Contributor

@oleonardolima oleonardolima left a comment

Choose a reason for hiding this comment

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

utACK 3869705

Copy link
Contributor

@oleonardolima oleonardolima left a 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.

Copy link
Member

@notmandatory notmandatory left a comment

Choose a reason for hiding this comment

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

ACK 309a607

@notmandatory notmandatory added the api A breaking API change label Nov 19, 2024
Copy link
Contributor

@oleonardolima oleonardolima left a comment

Choose a reason for hiding this comment

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

ACK 309a607

@notmandatory notmandatory merged commit 35e7051 into bitcoindevkit:master Nov 21, 2024
20 checks passed
@rustaceanrob rustaceanrob deleted the maturity-11-16 branch November 21, 2024 04:10
@notmandatory notmandatory mentioned this pull request Dec 11, 2024
32 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api A breaking API change audit Suggested as result of external code audit module-blockchain

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Use rust-bitcoin's COINBASE_MATURITY

4 participants