Skip to content

Commit 8778634

Browse files
committed
wpi
1 parent ef40395 commit 8778634

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/lib.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,15 @@ mod tests {
183183
}
184184
}
185185

186-
#[derive(Debug, Clone, PartialEq, Ord, Eq, PartialOrd, Arbitrary)]
186+
impl<'a> Arbitrary<'a> for Utxo {
187+
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self> {
188+
let value = Amount::arbitrary(u)?;
189+
let satisfaction_weight = Weight::arbitrary(u)?;
190+
Ok(Utxo { value, satisfaction_weight })
191+
}
192+
}
193+
194+
#[derive(Debug, Clone, PartialEq, Ord, Eq, PartialOrd)]
187195
pub struct Utxo {
188196
pub value: Amount,
189197
pub satisfaction_weight: Weight,

0 commit comments

Comments
 (0)