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
relative::LockTime should implement ordered::ArbitraryOrd #2566
Milestone
Comments
why it has been disabled? |
Its feature gated to give users control of their dependency graph, i.e., only enable whats needed. |
tcharding
added a commit
to tcharding/rust-bitcoin
that referenced
this issue
Mar 13, 2024
TL;DR As we do for `absolute::LockTime` and for the same reasons; implement `ArbitraryOrd` for `relative::LockTime`. locktimes do not have a semantic ordering if they differ (blocks, time) so we do not derive `Ord` however it is useful for downstream to be able to order structs that contain lock times. This is exactly what the `ArbitraryOrd` trait is for. Fix: rust-bitcoin#2566
tcharding
added a commit
to tcharding/rust-bitcoin
that referenced
this issue
Mar 13, 2024
TL;DR As we do for `absolute::LockTime` and for the same reasons; implement `ArbitraryOrd` for `relative::LockTime`. locktimes do not have a semantic ordering if they differ (blocks, time) so we do not derive `Ord` however it is useful for downstream to be able to order structs that contain lock times. This is exactly what the `ArbitraryOrd` trait is for. Fix: rust-bitcoin#2566
tcharding
added a commit
to tcharding/rust-bitcoin
that referenced
this issue
Mar 20, 2024
TL;DR As we do for `absolute::LockTime` and for the same reasons; implement `ArbitraryOrd` for `relative::LockTime`. locktimes do not have a semantic ordering if they differ (blocks, time) so we do not derive `Ord` however it is useful for downstream to be able to order structs that contain lock times. This is exactly what the `ArbitraryOrd` trait is for. Fix: rust-bitcoin#2566
tcharding
added a commit
to tcharding/rust-bitcoin
that referenced
this issue
Mar 24, 2024
TL;DR As we do for `absolute::LockTime` and for the same reasons; implement `ArbitraryOrd` for `relative::LockTime`. locktimes do not have a semantic ordering if they differ (blocks, time) so we do not derive `Ord` however it is useful for downstream to be able to order structs that contain lock times. This is exactly what the `ArbitraryOrd` trait is for. Update the rustdocs in `relative` and mirror the docs changes in `absolute`. Fix: rust-bitcoin#2566
apoelstra
added a commit
that referenced
this issue
Apr 2, 2024
d91cdd2 docs: Document ordered feature (Tobin C. Harding) 3520f55 Implement ArbitraryOrd for relative::LockTime (Tobin C. Harding) Pull request description: TL;DR As we do for `absolute::LockTime` and for the same reasons; implement `ArbitraryOrd` for `relative::LockTime`. locktimes do not have a semantic ordering if they differ (blocks, time) so we do not derive `Ord` however it is useful for downstream to be able to order structs that contain lock times. This is exactly what the `ArbitraryOrd` trait is for. Fix: #2566 ACKs for top commit: sanket1729: ACK d91cdd2 apoelstra: ACK d91cdd2 Tree-SHA512: 52ace9222e765dfa266d003b4aff3e93e35d1414c9fd579c4a4a36998d6d1b08bf6d4964a6f1c1d769068d65e47a882495daa4aacf254909a35dce8e01c99a9e
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Maybe worth thinking of other types that should implement ArbitraryOrd as well.
The text was updated successfully, but these errors were encountered: