fix(http_api): ignore committee_index in attestation data endpoint (#9437)

Co-Authored-By: Vansh Sahay <vansh.sahay1234@gmail.com>

Co-Authored-By: chonghe <44791194+chong-he@users.noreply.github.com>
This commit is contained in:
Vansh Sahay
2026-06-17 06:46:09 +05:30
committed by GitHub
parent e8472b9d77
commit eb0da57044
2 changed files with 16 additions and 1 deletions

View File

@@ -4856,6 +4856,19 @@ impl ApiTester {
assert_eq!(result, expected);
}
// The committee_index in the response must always be 0 post-Electra,
// regardless of the query parameter.
let committee_count = state.get_committee_count_at_slot(slot).unwrap();
if committee_count > 0 {
let result = self
.client
.get_validator_attestation_data(slot, 1)
.await
.unwrap()
.data;
assert_eq!(result.index, 0);
}
self
}