fix bug in test fn compare_all_accounts (#30217)

#### Problem
test code compares sets of accounts after clean/shrink operations.
The indexing was off and new tests were giving false positives.
The test code was equivalent as long as everything was in the same
order.

#### Summary of Changes
Fix test code comparison indexes.

Fixes #
<!-- OPTIONAL: Feature Gate Issue: # -->
<!-- Don't forget to add the "feature-gate" label -->
This commit is contained in:
Jeff Washington (jwash) 2023-02-09 13:28:53 -06:00 committed by GitHub
parent 57dced05f0
commit e0d354f542
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -17323,7 +17323,7 @@ pub mod tests {
for i in 0..two_indexes.len() {
let pubkey2 = two[two_indexes[i]].0;
if pubkey2 == *pubkey {
assert!(accounts_equal(account, &two[i].1));
assert!(accounts_equal(account, &two[two_indexes[i]].1));
two_indexes.remove(i);
break;
}