Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions crates/common/src/config/mux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,12 +476,17 @@ async fn fetch_ssv_pubkeys_from_public_api(
page += 1;

if fetched < MAX_PER_PAGE {
ensure!(
pubkeys.len() == response.pagination.total,
"expected {} keys, got {}",
response.pagination.total,
pubkeys.len()
);
// Past-end page (fetched == 0) returns pagination.total == 0 from the SSV
// public API; only assert the total when the page actually carried
// data.
if fetched > 0 {
ensure!(
pubkeys.len() == response.pagination.total,
"expected {} keys, got {}",
response.pagination.total,
pubkeys.len()
);
}
break;
}
}
Expand Down
Loading