Skip to content

Commit 96029a6

Browse files
committed
fix
1 parent a0e1b7c commit 96029a6

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

  • crates/common/src/config

crates/common/src/config/mux.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -431,12 +431,17 @@ async fn fetch_ssv_pubkeys(
431431
page += 1;
432432

433433
if fetched < MAX_PER_PAGE {
434-
ensure!(
435-
pubkeys.len() == response.pagination.total,
436-
"expected {} keys, got {}",
437-
response.pagination.total,
438-
pubkeys.len()
439-
);
434+
// Past-end page (fetched == 0) returns pagination.total == 0 from the SSV
435+
// public API; only assert the total when the page actually carried
436+
// data.
437+
if fetched > 0 {
438+
ensure!(
439+
pubkeys.len() == response.pagination.total,
440+
"expected {} keys, got {}",
441+
response.pagination.total,
442+
pubkeys.len()
443+
);
444+
}
440445
break;
441446
}
442447
}

0 commit comments

Comments
 (0)