()
| 57 | |
| 58 | #[tokio::test] |
| 59 | async fn test_validate_invalid_script_sig() { |
| 60 | let (mut peg_in_graph, _, _, _) = setup_and_create_graphs().await; |
| 61 | |
| 62 | let deposit_tx = peg_in_graph.peg_in_deposit_transaction.tx_mut(); |
| 63 | deposit_tx.input[0].script_sig = generate_burn_script(); |
| 64 | let deposit_txid = deposit_tx.compute_txid(); |
| 65 | |
| 66 | let result = peg_in_graph.validate(); |
| 67 | |
| 68 | assert!(matches!( |
| 69 | result, |
| 70 | Err(Error::Validation(ValidationError::TxValidationFailed( |
| 71 | _, |
| 72 | _, |
| 73 | _ |
| 74 | ))) |
| 75 | )); |
| 76 | |
| 77 | if let Err(Error::Validation(ValidationError::TxValidationFailed(tx_name, txid, input_index))) = |
| 78 | result |
| 79 | { |
| 80 | assert_eq!(tx_name, "PegInDeposit"); |
| 81 | assert_eq!(txid, deposit_txid); |
| 82 | assert_eq!(input_index, 0); |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | #[tokio::test] |
| 87 | async fn test_validate_invalid_sequence() { |
nothing calls this directly
no test coverage detected