MCPcopy Create free account
hub / github.com/base/base / test_sequence_validator

Function test_sequence_validator

crates/execution/flashblocks/src/validation.rs:280–296  ·  view source on GitHub ↗
(
        #[case] latest_block: u64,
        #[case] latest_idx: u64,
        #[case] incoming_block: u64,
        #[case] incoming_idx: u64,
        #[case] incoming_prev_flashblock_id: FlashblockId,

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected