Skip to content

Commit 116e337

Browse files
committed
wip
1 parent e572c10 commit 116e337

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

Cargo.toml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,23 @@ authors = [
33
"Yancy Ribbens <email@yancy.lol>",
44
]
55
edition = "2018"
6+
homepage = "https://github.com/rust-bitcoin/rust-bitcoin-coin-selection/"
67
license = "CC0-1.0"
78
name = "bitcoin-coin-selection"
8-
repository = "https://github.com/p2pderivatives/rust-bitcoin-coin-selection"
9-
version = "0.7.1"
9+
repository = "https://github.com/rust-bitcoin/rust-bitcoin-coin-selection/"
10+
version = "0.6.1"
1011
# documentation = "https://docs.rs/bitcoin-coin-selection/"
1112
description = "Libary providing utility functions to efficiently select a set of UTXOs."
1213
keywords = ["bitcoin", "coin-selection", "coin", "coinselection", "utxo"]
1314
readme = "README.md"
1415
rust-version = "1.63.0"
1516

16-
[package.metadata.docs.rs]
17-
features = ["rand"]
18-
1917
[dependencies]
20-
bitcoin = "0.32.7"
21-
rand = { version = "0.8.5", optional = true }
18+
bitcoin = { git = "https://github.com/rust-bitcoin/rust-bitcoin.git", rev = "eb59238769471bef7ba79a418bc124f05660e571" }
19+
rand = {version = "0.8.5", default-features = false, optional = true}
2220

2321
[dev-dependencies]
24-
bitcoin = "0.32.7"
22+
bitcoin = { git = "https://github.com/rust-bitcoin/rust-bitcoin.git", rev = "eb59238769471bef7ba79a418bc124f05660e571", features = ["arbitrary"] }
2523
criterion = "0.3"
2624
bitcoin-coin-selection = {path = ".", features = ["rand"]}
2725
rand = "0.8.5"
@@ -34,4 +32,4 @@ name = "coin_selection"
3432
harness = false
3533

3634
[patch.crates-io]
37-
bitcoin-units = { git = "https://github.com/rust-bitcoin/rust-bitcoin.git", rev = "06d7edd7cf0d3e45b801a290b0937df7431caf70", features = ["arbitrary"] }
35+
bitcoin-units = { git = "https://github.com/rust-bitcoin/rust-bitcoin.git", rev = "eb59238769471bef7ba79a418bc124f05660e571" }

src/lib.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,15 @@ mod tests {
187187
}
188188
}
189189

190-
#[derive(Debug, Clone, PartialEq, Ord, Eq, PartialOrd, Arbitrary)]
190+
impl<'a> Arbitrary<'a> for Utxo {
191+
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self> {
192+
let value = Amount::arbitrary(u)?;
193+
let satisfaction_weight = Weight::arbitrary(u)?;
194+
Ok(Utxo { value, satisfaction_weight })
195+
}
196+
}
197+
198+
#[derive(Debug, Clone, PartialEq, Ord, Eq, PartialOrd)]
191199
pub struct Utxo {
192200
pub value: Amount,
193201
pub satisfaction_weight: Weight,

0 commit comments

Comments
 (0)