Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshOrndorff committed Apr 5, 2024
1 parent 3750661 commit 03d60d6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
16 changes: 8 additions & 8 deletions tuxedo-core/src/verifier/htlc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ mod test {
signature: recipient_sig,
};

assert!(htlc.verify(&simplified_tx, 0, &redeemer));
assert!(htlc.verify(simplified_tx, 0, &redeemer));
}

#[test]
Expand All @@ -249,7 +249,7 @@ mod test {
signature: recipient_sig,
};

assert!(!htlc.verify(&simplified_tx, 0, &redeemer));
assert!(!htlc.verify(simplified_tx, 0, &redeemer));
}

#[test]
Expand All @@ -272,7 +272,7 @@ mod test {
signature: bad_sig(),
};

assert!(!htlc.verify(&simplified_tx, 0, &redeemer));
assert!(!htlc.verify(simplified_tx, 0, &redeemer));
}

#[test]
Expand All @@ -296,7 +296,7 @@ mod test {
signature: refunder_sig,
};

assert!(!htlc.verify(&simplified_tx, 0, &redeemer));
assert!(!htlc.verify(simplified_tx, 0, &redeemer));
}

#[test]
Expand All @@ -319,7 +319,7 @@ mod test {
signature: refunder_sig,
};

assert!(htlc.verify(&simplified_tx, 2 * THRESHOLD, &redeemer));
assert!(htlc.verify(simplified_tx, 2 * THRESHOLD, &redeemer));
}

#[test]
Expand All @@ -342,7 +342,7 @@ mod test {
signature: refunder_sig,
};

assert!(!htlc.verify(&simplified_tx, 0, &redeemer));
assert!(!htlc.verify(simplified_tx, 0, &redeemer));
}

#[test]
Expand All @@ -364,7 +364,7 @@ mod test {
signature: bad_sig(),
};

assert!(!htlc.verify(&simplified_tx, 2 * THRESHOLD, &redeemer));
assert!(!htlc.verify(simplified_tx, 2 * THRESHOLD, &redeemer));
}

#[test]
Expand All @@ -387,6 +387,6 @@ mod test {
signature: recipient_sig,
};

assert!(!htlc.verify(&simplified_tx, 2 * THRESHOLD, &redeemer));
assert!(!htlc.verify(simplified_tx, 2 * THRESHOLD, &redeemer));
}
}
4 changes: 2 additions & 2 deletions tuxedo-template-runtime/src/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ mod tests {
.unwrap()
.clone();

assert_eq!(tx.outputs.get(0), Some(&genesis_utxo));
assert_eq!(tx.outputs.first(), Some(&genesis_utxo));

let tx_hash = BlakeTwo256::hash_of(&tx.encode());
let output_ref = OutputRef {
Expand Down Expand Up @@ -179,7 +179,7 @@ mod tests {
.unwrap()
.clone();

assert_eq!(tx.outputs.get(0), Some(&genesis_multi_sig_utxo));
assert_eq!(tx.outputs.first(), Some(&genesis_multi_sig_utxo));

let tx_hash = BlakeTwo256::hash_of(&tx.encode());
let output_ref = OutputRef {
Expand Down
4 changes: 1 addition & 3 deletions wardrobe/parachain/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,11 @@ fn update_parachain_info_with_otherwise_valid_old_info_as_normal_input() {
#[test]
fn update_parachain_info_extra_outputs() {
let old: DynamicallyTypedData = new_data_from_relay_parent_number(3).into();
let inputs = vec![old];
let new1: DynamicallyTypedData = new_data_from_relay_parent_number(4).into();
let new2: DynamicallyTypedData = Bogus.into();
let outputs = vec![new1.into(), new2.into()];

assert_eq!(
SetParachainInfo::<MockConfig>(Default::default()).check(&inputs, &[], &[], &outputs),
SetParachainInfo::<MockConfig>(Default::default()).check(&[old], &[], &[], &[new1, new2]),
Err(ExtraOutputs)
);
}
Expand Down

0 comments on commit 03d60d6

Please sign in to comment.