Browse Source

Use byte strings in tests

state-machine
Lucas Soriano del Pino 3 years ago
parent
commit
5e6f6b4d5a
No known key found for this signature in database GPG Key ID: EE611E973A1530E7
  1. 4
      cfd_protocol/src/lib.rs
  2. 4
      cfd_protocol/tests/dlc_protocol.rs

4
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),
);

4
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(),
),

Loading…
Cancel
Save