-
Notifications
You must be signed in to change notification settings - Fork 640
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
Move types to units
#2569
Move types to units
#2569
Conversation
062c141
to
6337963
Compare
Pull Request Test Coverage Report for Build 8241935679Details
💛 - Coveralls |
FTR the "unit type" term in Rust refers to the |
Ah yes, of course - will change. |
The `absolute::Error` is not used, we originally intended it as possibly useful for users of the library. We have not made effort in other modules to provide such errors - lets remove it.
1af8534
to
69e3513
Compare
69e3513
to
d2549b7
Compare
Move the following unit types to the new `units` crate: - `locktime::absolute::{Height, Time}` - `locktime::relative::{Height, Time}` - `FeeRate` - `Weight` Also move the `parse` module as well as constants as required. Do minimal changes to get things building: - Feature gate on "alloc" as needed. - Remove rustdocs that use `bitcoin` types. - Re-export units types so this is a non-breaking change. - Fix import paths.
d2549b7
to
cbee978
Compare
In future for PRs that move stuff, it might be useful to separate things in commits which we just copy pasting files (even if they don't compile) and the commits where you made changes to make things compile. We can squash/fixup commits to make sure that each and every commit compiles. |
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 cbee978
Thanks for the review @sanket1729, yeah I was a bit lazy on this one. |
Are you willing to review this as it is @apoelstra or do you want me to spit it up. If it matters I made minimal changes to get it to build, including IIRC:
Phew, now I write that it does seem a lot in one commit. But the only logical way to break it is to do Requesting special consideration to just review as is - pretty please :) |
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 cbee978 lgtm. this is a good start. I think the LockTime types should follow Height and Time
Move the following unit types to the new
units
crate:locktime::absolute::{Height, Time}
locktime::relative::{Height, Time}
FeeRate
Weight
Also move the
parse
module as well as constants as required.Do minimal changes to get things building:
bitcoin
types.Patch 1 was originally #2526, putting it in via this PR to try and speed up the process.
Close: #2282