chore: Variable rename `height` ==> `slot` in blockstore function (#31132)

Slots refer to time windows where a block could be produced whereas
height refers to how many blocks are actually in a fork. This function
is operating on a list of slots, so the use of "height" is incorrect and
misleading.
This commit is contained in:
steviez 2023-04-11 02:38:20 -05:00 committed by GitHub
parent 12e3e8b467
commit 814de50f2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3043,7 +3043,7 @@ impl Blockstore {
let result: HashMap<u64, Vec<u64>> = slots
.iter()
.zip(slot_metas)
.filter_map(|(height, meta)| meta.map(|meta| (*height, meta.next_slots.to_vec())))
.filter_map(|(slot, meta)| meta.map(|meta| (*slot, meta.next_slots.to_vec())))
.collect();
Ok(result)