Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Refactors unsafe out of CacheHashDataFile's header #33270

Conversation

brooksprumo
Copy link
Contributor

Problem

We use unsafe blocks to read/write data in the various accounts hash files. That's not always needed.

The Header type for cache hash data files is written-to and read-from disk, and we use unsafe blocks for that. But we don't need to.

Summary of Changes

Derive Pod for Header and refactor all of its unsafe blocks to use bytemuck.

@brooksprumo brooksprumo self-assigned this Sep 15, 2023
@brooksprumo brooksprumo marked this pull request as ready for review September 15, 2023 16:30
Copy link
Contributor

@HaoranYi HaoranYi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. thanks!

@brooksprumo brooksprumo added the automerge Merge this Pull Request automatically once CI passes label Sep 15, 2023
@mergify mergify bot merged commit a47f65d into solana-labs:master Sep 15, 2023
@brooksprumo brooksprumo deleted the accounts-hash/cache-hash-data/header/pod branch September 15, 2023 16:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants