//! Fuzzing target for fork detection and reseeding
#![no_main]uselibfuzzer_sys::fuzz_target;useclock_rand::*;fuzz_target!(|data:&[u8]|{// Only test with custom_rng feature
#[cfg(feature ="custom_rng")]{if data.len()>=32{let hash1:[u8;32]= data[..32].try_into().unwrap();letmut rng =ChainSeedX::builder().with_block_hash(hash1).with_fork_detection(true).build().unwrap();// Generate some values first
let_=<ChainSeedX as Rng>::next_u64(&mut rng);let_= rng.next_u32();// Test fork detection with fuzzer input as new hash
let_= rng.check_fork(&hash1);// Same hash (no fork)
let_= rng.check_fork(data);// Different hash (potential fork)
// Continue generating values
let_=<ChainSeedX as Rng>::next_u64(&mut rng);}}});