Skip to content

Add FIFTY_BTC const to the amount types#3915

Merged
apoelstra merged 2 commits intorust-bitcoin:masterfrom
tcharding:01-17-amount-consts
Jan 20, 2025
Merged

Add FIFTY_BTC const to the amount types#3915
apoelstra merged 2 commits intorust-bitcoin:masterfrom
tcharding:01-17-amount-consts

Conversation

@tcharding
Copy link
Copy Markdown
Member

The mining reward for the first epoc is 50 bitcoin. For mainnet this is old news but for regtest it is still relevant.

Add and use a new const FIFTY_BTC to the Amount type. To keep the amount types uniform also add it to the SignedAmount.

The mining reward for the first epoc is 50 bitcoin. For mainnet this is
old news but for regtest it is still relevant.

Add and use a new const `FIFTY_BTC` to the `Amount` type. To keep the
amount types uniform also add it to the `SignedAmount`.
@github-actions github-actions bot added C-bitcoin PRs modifying the bitcoin crate C-units PRs modifying the units crate labels Jan 16, 2025
@tcharding
Copy link
Copy Markdown
Member Author

First discussed in #3794: #3794 (comment)

@storopoli
Copy link
Copy Markdown
Contributor

ACK e002823

This is a nice addition. A lot of workflows around regtest (including tests) would benefit from this easy constant.

Copy link
Copy Markdown
Contributor

@jamillambert jamillambert left a comment

Choose a reason for hiding this comment

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

ACK e002823

Copy link
Copy Markdown
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK e002823; successfully ran local tests

@tcharding
Copy link
Copy Markdown
Member Author

tcharding commented Jan 19, 2025

Merge today please @apoelstra if you get a chance, I'm chomping at the bit to get units done so we can do the 1.0-alpha release done.

@apoelstra apoelstra merged commit 05c28cf into rust-bitcoin:master Jan 20, 2025
@tcharding
Copy link
Copy Markdown
Member Author

BOOM! Thanks bro

@tcharding tcharding deleted the 01-17-amount-consts branch January 20, 2025 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-bitcoin PRs modifying the bitcoin crate C-units PRs modifying the units crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants