()
| 85 | |
| 86 | #[tokio::test] |
| 87 | async fn test_validate_invalid_sequence() { |
| 88 | let (mut peg_in_graph, _, _, _) = setup_and_create_graphs().await; |
| 89 | |
| 90 | let deposit_tx = peg_in_graph.peg_in_deposit_transaction.tx_mut(); |
| 91 | deposit_tx.input[0].sequence = bitcoin::Sequence(100); |
| 92 | let deposit_txid = deposit_tx.compute_txid(); |
| 93 | |
| 94 | let result = peg_in_graph.validate(); |
| 95 | |
| 96 | assert!(matches!( |
| 97 | result, |
| 98 | Err(Error::Validation(ValidationError::TxValidationFailed( |
| 99 | _, |
| 100 | _, |
| 101 | _ |
| 102 | ))) |
| 103 | )); |
| 104 | |
| 105 | if let Err(Error::Validation(ValidationError::TxValidationFailed(tx_name, txid, input_index))) = |
| 106 | result |
| 107 | { |
| 108 | assert_eq!(tx_name, "PegInDeposit"); |
| 109 | assert_eq!(txid, deposit_txid); |
| 110 | assert_eq!(input_index, 0); |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | #[tokio::test] |
| 115 | async fn test_validate_invalid_value() { |
nothing calls this directly
no test coverage detected