diff --git a/Cargo-minimal.lock b/Cargo-minimal.lock index f90f321d5..228661483 100644 --- a/Cargo-minimal.lock +++ b/Cargo-minimal.lock @@ -62,7 +62,6 @@ dependencies = [ "bitcoinconsensus", "hex-conservative 0.3.0", "hex_lit", - "ordered", "secp256k1", "serde", "serde_json", @@ -111,7 +110,6 @@ dependencies = [ "bitcoin-units", "bitcoin_hashes 0.16.0", "hex-conservative 0.3.0", - "ordered", "serde", "serde_json", ] @@ -254,12 +252,6 @@ dependencies = [ "libc", ] -[[package]] -name = "ordered" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79c12388aac4f817eae0359011d67d4072ed84cfc63b0d9a7958ef476fb74bec" - [[package]] name = "ppv-lite86" version = "0.2.8" diff --git a/Cargo-recent.lock b/Cargo-recent.lock index 8b590d8ac..2b4ef7378 100644 --- a/Cargo-recent.lock +++ b/Cargo-recent.lock @@ -61,7 +61,6 @@ dependencies = [ "bitcoinconsensus", "hex-conservative 0.3.0", "hex_lit", - "ordered", "secp256k1", "serde", "serde_json", @@ -110,7 +109,6 @@ dependencies = [ "bitcoin-units", "bitcoin_hashes 0.16.0", "hex-conservative 0.3.0", - "ordered", "serde", "serde_json", ] @@ -262,12 +260,6 @@ dependencies = [ "libc", ] -[[package]] -name = "ordered" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79c12388aac4f817eae0359011d67d4072ed84cfc63b0d9a7958ef476fb74bec" - [[package]] name = "ppv-lite86" version = "0.2.20" diff --git a/bitcoin/Cargo.toml b/bitcoin/Cargo.toml index 9713bf200..ab765c7e2 100644 --- a/bitcoin/Cargo.toml +++ b/bitcoin/Cargo.toml @@ -39,7 +39,6 @@ arbitrary = { version = "1.4", optional = true } base64 = { version = "0.22.0", optional = true } # `bitcoinconsensus` version includes metadata which indicates the version of Core. Use `cargo tree` to see it. bitcoinconsensus = { version = "0.106.0", default-features = false, optional = true } -ordered = { version = "0.4.0", optional = true } serde = { version = "1.0.103", default-features = false, features = [ "derive", "alloc" ], optional = true } [dev-dependencies] diff --git a/bitcoin/contrib/test_vars.sh b/bitcoin/contrib/test_vars.sh index c65af099d..f28ecdb33 100644 --- a/bitcoin/contrib/test_vars.sh +++ b/bitcoin/contrib/test_vars.sh @@ -5,10 +5,10 @@ # shellcheck disable=SC2034 # Test all these features with "std" enabled. -FEATURES_WITH_STD="rand-std serde secp-recovery bitcoinconsensus base64 ordered arbitrary" +FEATURES_WITH_STD="rand-std serde secp-recovery bitcoinconsensus base64 arbitrary" # Test all these features without "std" or "alloc" enabled. -FEATURES_WITHOUT_STD="rand serde secp-recovery bitcoinconsensus base64 ordered arbitrary" +FEATURES_WITHOUT_STD="rand serde secp-recovery bitcoinconsensus base64 arbitrary" # Run these examples. EXAMPLES="ecdsa-psbt:std,bitcoinconsensus sign-tx-segwit-v0:rand-std sign-tx-taproot:rand-std taproot-psbt:bitcoinconsensus,rand-std sighash:std" diff --git a/bitcoin/src/lib.rs b/bitcoin/src/lib.rs index da1a714ac..af6386a40 100644 --- a/bitcoin/src/lib.rs +++ b/bitcoin/src/lib.rs @@ -16,7 +16,6 @@ //! * `base64` (dependency) - enables encoding of PSBTs and message signatures. //! * `bitcoinconsensus` (dependency) - enables validating scripts and transactions. //! * `default` - enables `std` and `secp-recovery`. -//! * `ordered` (dependency) - adds implementations of `ArbitraryOrd` to some structs. //! * `rand` (transitive dependency) - makes it more convenient to generate random values. //! * `rand-std` - same as `rand` but also enables `std` here and in `secp256k1`. //! * `serde` (dependency) - implements `serde`-based serialization and deserialization. @@ -80,10 +79,6 @@ pub extern crate hex; /// Re-export the `bitcoin-io` crate. pub extern crate io; -/// Re-export the `ordered` crate. -#[cfg(feature = "ordered")] -pub extern crate ordered; - /// Re-export the `rust-secp256k1` crate. /// /// Rust wrapper library for Pieter Wuille's libsecp256k1. Implements ECDSA and BIP-340 signatures diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index 241be623a..afb74fd00 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -28,7 +28,6 @@ internals = { package = "bitcoin-internals", version = "0.4.0" } units = { package = "bitcoin-units", version = "0.2.0", default-features = false } arbitrary = { version = "1.4", optional = true } -ordered = { version = "0.4.0", optional = true } serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"], optional = true } [dev-dependencies] diff --git a/primitives/contrib/test_vars.sh b/primitives/contrib/test_vars.sh index ef4753dd1..159713bb9 100644 --- a/primitives/contrib/test_vars.sh +++ b/primitives/contrib/test_vars.sh @@ -5,10 +5,10 @@ # shellcheck disable=SC2034 # Test these features with "std" enabled. -FEATURES_WITH_STD="ordered serde arbitrary" +FEATURES_WITH_STD="serde arbitrary" # Test these features without "std" enabled. -FEATURES_WITHOUT_STD="alloc ordered serde arbitrary" +FEATURES_WITHOUT_STD="alloc serde arbitrary" # Run these examples. EXAMPLES="" diff --git a/primitives/src/locktime/absolute.rs b/primitives/src/locktime/absolute.rs index da8ef86b7..b6321f772 100644 --- a/primitives/src/locktime/absolute.rs +++ b/primitives/src/locktime/absolute.rs @@ -5,7 +5,6 @@ //! There are two types of lock time: lock-by-blockheight and lock-by-blocktime, distinguished by //! whether `LockTime < LOCKTIME_THRESHOLD`. -use core::cmp::Ordering; use core::fmt; #[cfg(feature = "arbitrary")] @@ -28,11 +27,12 @@ pub use units::locktime::absolute::{ConversionError, Height, ParseHeightError, P /// ### Note on ordering /// /// Locktimes may be height- or time-based, and these metrics are incommensurate; there is no total -/// ordering on locktimes. We therefore have implemented [`PartialOrd`] but not [`Ord`]. +/// ordering on locktimes. In order to compare locktimes, instead of using `<` or `>` we provide the +/// [`LockTime::is_satisfied_by`] API. +/// /// For [`Transaction`], which has a locktime field, we implement a total ordering to make /// it easy to store transactions in sorted data structures, and use the locktime's 32-bit integer -/// consensus encoding to order it. We also implement [`ordered::ArbitraryOrd`] if the "ordered" -/// feature is enabled. +/// consensus encoding to order it. /// /// ### Relevant BIPs /// @@ -319,19 +319,6 @@ impl From