pub async fn check_chain_rollback(
    header: &Header,
    workspace: &SysValidationWorkspace,
) -> SysValidationResult<()> {
    let empty = workspace.header_seq_is_empty(header)?;

    // Ok or log warning
    if empty {
        Ok(())
    } else {
        // TODO: implement real rollback detection once we know what that looks like
        tracing::error!(
            "Chain rollback detected at position {} for agent {:?} from header {:?}",
            header.header_seq(),
            header.author(),
            header,
        );
        Ok(())
    }
}
/// Check if there are other headers at this
/// sequence number
Check if there are other headers at this
sequence number
Check if there are other headers at this sequence number
pub async fn check_chain_rollback(
    header: &Header,
    workspace: &SysValidationWorkspace,
) -> SysValidationResult<()> {
    let empty = workspace.header_seq_is_empty(header)?;
    // Ok or log warning
    if empty {
        Ok(())
    } else {
        // TODO: implement real rollback detection once we know what that looks like
        tracing::error!(
            "Chain rollback detected at position {} for agent {:?} from header {:?}",
            header.header_seq(),
            header.author(),
            header,
        );
        Ok(())
    }
}
pub async fn check_chain_rollback ( header : & Header , workspace : & SysValidationWorkspace , ) -> SysValidationResult < ( ) > { let empty = workspace . header_seq_is_empty ( header ) ? ; // Ok or log warning if empty { Ok ( ( ) ) } else { // TODO: implement real rollback detection once we know what that looks like tracing :: error ! ( " " header header_seq ( ) header author ( ) header ) ; Ok ( ( ) ) } }
Check if there are other headers at this
sequence number
Check if there are other headers at this sequence number
header
&Header
workspace
&SysValidationWorkspace
header
&Header
workspace
&SysValidationWorkspace