| 2663 | /// named [`BaseTxPoolError::Eip8130Validation`] reason. |
| 2664 | #[track_caller] |
| 2665 | fn assert_structural_reason( |
| 2666 | result: Result<(), InvalidPoolTransactionError>, |
| 2667 | expected: &'static str, |
| 2668 | ) { |
| 2669 | match result { |
| 2670 | Err(InvalidPoolTransactionError::Other(error)) => { |
| 2671 | match error.as_any().downcast_ref::<BaseTxPoolError>() { |
| 2672 | Some(BaseTxPoolError::Eip8130Validation { reason }) => { |
| 2673 | assert_eq!(*reason, expected); |
| 2674 | } |
| 2675 | other => panic!("expected Eip8130Validation, got {other:?}"), |
| 2676 | } |
| 2677 | } |
| 2678 | other => panic!("expected Eip8130Validation, got {other:?}"), |
| 2679 | } |
| 2680 | } |
| 2681 | |
| 2682 | #[track_caller] |
| 2683 | fn assert_eip8130_validation_reason( |