From 5e6f6b4d5aeebf91ce489e0526e674afa9628608 Mon Sep 17 00:00:00 2001 From: Lucas Soriano del Pino Date: Thu, 9 Sep 2021 12:12:24 +1000 Subject: [PATCH] Use byte strings in tests --- cfd_protocol/src/lib.rs | 4 ++-- cfd_protocol/tests/dlc_protocol.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cfd_protocol/src/lib.rs b/cfd_protocol/src/lib.rs index 77a4ec0..a3294c4 100644 --- a/cfd_protocol/src/lib.rs +++ b/cfd_protocol/src/lib.rs @@ -865,7 +865,7 @@ mod tests { let orig_maker_amount = 1000; let orig_taker_amount = 1000; let payout = Payout::new( - "win".to_string().into_bytes(), + b"win".to_vec(), Amount::from_sat(orig_maker_amount), Amount::from_sat(orig_taker_amount), ); @@ -895,7 +895,7 @@ mod tests { let orig_maker_amount = dummy_dust_limit.as_sat() - 1; let orig_taker_amount = 1000; let payout = Payout::new( - "win".to_string().into_bytes(), + b"win".to_vec(), Amount::from_sat(orig_maker_amount), Amount::from_sat(orig_taker_amount), ); diff --git a/cfd_protocol/tests/dlc_protocol.rs b/cfd_protocol/tests/dlc_protocol.rs index 12e1504..a3ef08e 100644 --- a/cfd_protocol/tests/dlc_protocol.rs +++ b/cfd_protocol/tests/dlc_protocol.rs @@ -30,12 +30,12 @@ fn run_cfd_protocol() { let payouts = vec![ Payout::new( - "win".to_string().into_bytes(), + b"win".to_vec(), Amount::from_btc(2.0).unwrap(), Amount::ZERO, ), Payout::new( - "lose".to_string().into_bytes(), + b"lose".to_vec(), Amount::ZERO, Amount::from_btc(2.0).unwrap(), ),