fn check_challenge_maturity(
    config: &RollupConfig,
    challenge_cell: &ChallengeCell,
) -> Result<(), Error> {
    let challenge_maturity_blocks: u64 = config.challenge_maturity_blocks().unpack();
    let since = Since::new(load_input_since(challenge_cell.index, Source::Input)?);
    if let Some(LockValue::BlockNumber(n)) = since.extract_lock_value() {
        if since.is_relative() && n >= challenge_maturity_blocks {
            return Ok(());
        }
    }
    Err(Error::InvalidChallengeCell)
}
/// Check challenge cell is maturity(on the layer1)
Check challenge cell is maturity(on the layer1)
Check challenge cell is maturity ( on the layer1 )
fn check_challenge_maturity(
    config: &RollupConfig,
    challenge_cell: &ChallengeCell,
) -> Result<(), Error> {
    let challenge_maturity_blocks: u64 = config.challenge_maturity_blocks().unpack();
    let since = Since::new(load_input_since(challenge_cell.index, Source::Input)?);
    if let Some(LockValue::BlockNumber(n)) = since.extract_lock_value() {
        if since.is_relative() && n >= challenge_maturity_blocks {
            return Ok(());
        }
    }
    Err(Error::InvalidChallengeCell)
}
fn check_challenge_maturity ( config : & RollupConfig , challenge_cell : & ChallengeCell , ) -> Result < ( ) , Error > { let challenge_maturity_blocks : u64 = config . challenge_maturity_blocks ( ) . unpack ( ) ; let since = Since :: new ( load_input_since ( challenge_cell . index , Source :: Input ) ? ) ; if let Some ( LockValue :: BlockNumber ( n ) ) = since . extract_lock_value ( ) { if since . is_relative ( ) && n >= challenge_maturity_blocks { return Ok ( ( ) ) ; } } Err ( Error :: InvalidChallengeCell ) }
Check challenge cell is maturity(on the layer1)
Check challenge cell is maturity ( on the layer1 )
config
&RollupConfig
challenge_cell
&ChallengeCell
config
&RollupConfig
challenge_cell
&ChallengeCell