pub fn check_prev_seq(header: &Header, prev_header: &Header) -> SysValidationResult<()> {
    let header_seq = header.header_seq();
    let prev_seq = prev_header.header_seq();
    if header_seq > 0 && prev_seq == header_seq - 1 {
        Ok(())
    } else {
        Err(PrevHeaderError::InvalidSeq(header_seq, prev_seq))
            .map_err(|e| ValidationOutcome::from(e).into())
    }
}
/// Check the previous header is one less than the current
Check the previous header is one less than the current
Check the previous header is one less than the current
pub fn check_prev_seq(header: &Header, prev_header: &Header) -> SysValidationResult<()> {
    let header_seq = header.header_seq();
    let prev_seq = prev_header.header_seq();
    if header_seq > 0 && prev_seq == header_seq - 1 {
        Ok(())
    } else {
        Err(PrevHeaderError::InvalidSeq(header_seq, prev_seq))
            .map_err(|e| ValidationOutcome::from(e).into())
    }
}
pub fn check_prev_seq ( header : & Header , prev_header : & Header ) -> SysValidationResult < ( ) > { let header_seq = header . header_seq ( ) ; let prev_seq = prev_header . header_seq ( ) ; if header_seq > 0 && prev_seq == header_seq - 1 { Ok ( ( ) ) } else { Err ( PrevHeaderError :: InvalidSeq ( header_seq , prev_seq ) ) . map_err ( | e | ValidationOutcome :: from ( e ) . into ( ) ) } }
Check the previous header is one less than the current
Check the previous header is one less than the current
header
&Header
prev_header
&Header
header
&Header
prev_header
&Header