From a011cf5e44e57ad4da5a1e9d09bf1089950287bd Mon Sep 17 00:00:00 2001 From: conduition Date: Mon, 18 Mar 2024 20:24:22 +0000 Subject: [PATCH] fix use of option for expiry in tests --- src/serialization.rs | 2 +- tests/regtest.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/serialization.rs b/src/serialization.rs index 24862ba..2ee8278 100644 --- a/src/serialization.rs +++ b/src/serialization.rs @@ -253,7 +253,7 @@ mod tests { Vec::from(b"option 2"), Vec::from(b"option 3"), ], - expiry: u32::MAX, + expiry: Some(u32::MAX), }, outcome_payouts: BTreeMap::from([ (Outcome::Attestation(0), PayoutWeights::from([(0, 1)])), diff --git a/tests/regtest.rs b/tests/regtest.rs index 76a603e..a7263d8 100644 --- a/tests/regtest.rs +++ b/tests/regtest.rs @@ -353,7 +353,7 @@ fn simple_ticketed_dlc_simulation() { Vec::from(b"alice and bob win"), Vec::from(b"carol and dave win"), ], - expiry: u32::try_from(block_height + 2000).unwrap(), + expiry: u32::try_from(block_height + 2000).ok(), }, outcome_payouts, fee_rate: FeeRate::from_sat_per_vb_unchecked(100),