width of hash calc bins was off by 1 (#28124)

This commit is contained in:
Jeff Washington (jwash) 2022-09-29 11:45:53 -07:00 committed by GitHub
parent f38ed1c266
commit 80c0173452
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -6895,7 +6895,7 @@ impl AccountsDb {
let first_boundary =
((slot0 + MAX_ITEMS_PER_CHUNK) / MAX_ITEMS_PER_CHUNK) * MAX_ITEMS_PER_CHUNK;
let width = max_slot_inclusive - slot0;
let width = max_slot_inclusive - slot0 + 1;
// 2 is for 2 special chunks - unaligned slots at the beginning and end
let chunks = ancient_slot_count + 2 + (width as Slot / MAX_ITEMS_PER_CHUNK);
(0..chunks)