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

Commit

Permalink
ancient append vec append creates big enough ancient append vecs (#34154
Browse files Browse the repository at this point in the history
)

* ancient append vec append creates big enough ancient append vecs

* assert we write the correct # of bytes

* fix tests

* u64 align accounts bytes written

* fix build

* add tests

* we don't need to align the store to u64.

When we call `remaining_bytes` to calculate, for the last element, u64_align!(len) could be greater than capacity.  However, because saturate_sub is used, we still get the correct answer of 0. Therefore, no need to align the storage to u64.

* add comments

* add shink test for min_size

* remove dead code

* fix build

* reviews

* add test for squash ancient vec overflow too much to fit into ideal av

* add test for get_bytes on AccountToStore

* clippy

* modify test to assert 0 size of opposite

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
  • Loading branch information
jeffwashington and HaoranYi authored Dec 5, 2023
1 parent f41badf commit 091fc82
Show file tree
Hide file tree
Showing 2 changed files with 385 additions and 27 deletions.
Loading

0 comments on commit 091fc82

Please sign in to comment.