(
#[case] latest_block: u64,
#[case] latest_idx: u64,
#[case] incoming_block: u64,
#[case] incoming_idx: u64,
#[case] incoming_prev_flashblock_id: FlashblockId,
| 278 | SequenceValidationResult::InvalidNewBlockIndex { block_number: 99, index: 0 } |
| 279 | )] |
| 280 | fn test_sequence_validator( |
| 281 | #[case] latest_block: u64, |
| 282 | #[case] latest_idx: u64, |
| 283 | #[case] incoming_block: u64, |
| 284 | #[case] incoming_idx: u64, |
| 285 | #[case] incoming_prev_flashblock_id: FlashblockId, |
| 286 | #[case] expected: SequenceValidationResult, |
| 287 | ) { |
| 288 | let result = FlashblockSequenceValidator::validate( |
| 289 | latest_block, |
| 290 | latest_idx, |
| 291 | incoming_block, |
| 292 | incoming_idx, |
| 293 | incoming_prev_flashblock_id, |
| 294 | ); |
| 295 | assert_eq!(result, expected); |
| 296 | } |
| 297 | |
| 298 | // ==================== ReorgDetector Tests ==================== |
| 299 |
nothing calls this directly
no outgoing calls
no test coverage detected