8000 Rename `push_scriptint` and make it private by Kixunil · Pull Request #1527 · rust-bitcoin/rust-bitcoin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Rename push_scriptint and make it private #1527

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

Merged
merged 1 commit into from
Jan 6, 2023

Conversation

Kixunil
Copy link
Collaborator
@Kixunil Kixunil commented Jan 2, 2023

push_scriptint is a significant footgun with an unclear name. This renames it and unpublishes to avoid mistakes by downstream crates.

Closes #1517

@Kixunil Kixunil added the API break This PR requires a version bump for the next release label Jan 2, 2023
@Kixunil Kixunil added this to the 0.30.0 milestone Jan 2, 2023
@apoelstra
Copy link
Member

b63d51b952a6c5c15535182ae07ef8326837ea07 looks good except I'd change "optimize" to "minimize" everywhere, since the canonical term for correctly-encoded ints is "minimal".

It's a private method so I don't feel too strongly, but "optimized" makes it sound like it's a property of our code, not a property of the function output.

@Kixunil
Copy link
Collaborator Author
Kixunil commented Jan 3, 2023

"optimized" makes it sound like it's a property of our code, not a property of the function output.

I don't like "minimal" that much but this is a compelling argument.

@Kixunil Kixunil force-pushed the remove_push_scriptint branch from b63d51b to b62e81a Compare January 3, 2023 19:03
@apoelstra
Copy link
Member

Sorry to keep bikeshedding, but I actually think we should do non_minimal rather than non_minimized.

`push_scriptint` is a significant footgun with an unclear name. This
renames it and unpublishes to avoid mistakes by downstream crates.

Closes rust-bitcoin#1517
@Kixunil Kixunil force-pushed the remove_push_scriptint branch from b62e81a to 94b678e Compare January 4, 2023 21:58
@Kixunil
Copy link
Collaborator Author
Kixunil commented Jan 4, 2023

Yeah, actually, that name is better.

Copy link
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 94b678e

Copy link
Member
@sanket1729 sanket1729 left a comment

Choose a reason for hiding this comment

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

ACk 94b678e

@apoelstra apoelstra merged commit 5f2beb8 into rust-bitcoin:master Jan 6, 2023
@Kixunil Kixunil deleted the remove_push_scriptint branch January 6, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API break This PR requires a version bump for the next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

push_scriptint is a massive, potentially-money-losing, footgun
3 participants
0