Skip to content

Commit

Permalink
add panic on v1 shrink
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington committed Aug 23, 2022
1 parent 1da7efa commit 661e4ec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions runtime/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9084,6 +9084,7 @@ impl AccountsDb {
let sparse_by_bytes = (written_bytes as f32 / total_bytes as f32) <= 0.8;
let not_sparse = !sparse_by_count && !sparse_by_bytes;
let too_small_to_shrink = total_bytes <= PAGE_SIZE;
panic!("");
if not_sparse || too_small_to_shrink {
return 0;
}
Expand Down

0 comments on commit 661e4ec

Please sign in to comment.