Skip to content

Commit a371ce8

Browse files
committed
fix
1 parent 77f11ec commit a371ce8

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
@@ -476,12 +476,17 @@ async fn fetch_ssv_pubkeys_from_public_api(
476476
page += 1;
477477

478478
if fetched < MAX_PER_PAGE {
479-
ensure!(
480-
pubkeys.len() == response.pagination.total,
481-
"expected {} keys, got {}",
482-
response.pagination.total,
483-
pubkeys.len()
484-
);
479+
// Past-end page (fetched == 0) returns pagination.total == 0 from the SSV
480+
// public API; only assert the total when the page actually carried
481+
// data.
482+
if fetched > 0 {
483+
ensure!(
484+
pubkeys.len() == response.pagination.total,
485+
"expected {} keys, got {}",
486+
response.pagination.total,
487+
pubkeys.len()
488+
);
489+
}
485490
break;
486491
}
487492
}

0 commit comments

Comments
 (0)