# BLK-010: Status Updates (`update_status`)

## Summary

Update the `BlockStatus` of a `BlockRecord` in the in-memory record cache. Status changes are never persisted to disk because `BlockRecord` values are cache-only. Returns an error if no record exists in the cache for the given hash.

## Specification

```rust
impl BlockStore {
    /// Update the status of a cached BlockRecord.
    /// Returns an error if no BlockRecord is cached for the given hash.
    /// MUST NOT write to disk.
    pub fn update_status(
        &self,
        hash: &Bytes32,
        status: BlockStatus,
    ) -> Result<()> {
        let mut record = self
            .record_cache
            .get_mut(hash)
            .ok_or_else(|| Error::RecordNotCached(*hash))?;

        record.status = status;

        Ok(())
    }
}
```

## Acceptance Criteria

1. The `BlockRecord` in the in-memory cache is updated with the new `BlockStatus`.
2. No data is written to any RocksDB column family during a status update.
3. Returns an error (`RecordNotCached`) when no `BlockRecord` exists in the cache for the given hash.
4. Subsequent calls to `get_record` for the same hash reflect the updated status.

## Implementation Notes

- The record cache must support mutable access (e.g., `DashMap` or a sharded LRU with interior mutability).
- `BlockStatus` typically includes values like `Pending`, `Validated`, `Canonical`, `Orphaned`, etc.
- Since `BlockRecord` values are never persisted, status updates are lost on restart. Records are re-derived from headers on demand (with default status).
- This is intentional: runtime status is transient and reconstructed from chain state during startup.

## Test Plan

- **Unit: update status** -- Store a block (populating the record cache), call `update_status` with a new status, call `get_record`, verify the status is updated.
- **Unit: no disk write** -- Call `update_status`, inspect RocksDB write counters or mock, verify no write occurred.
- **Unit: missing record error** -- Call `update_status` for a hash not in the cache, verify `RecordNotCached` error.
- **Unit: multiple updates** -- Update status several times in sequence, verify each update is reflected.

## Expected Test Files

- `tests/blk_010_tests.rs`
