We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a0e1b7c commit 96029a6Copy full SHA for 96029a6
1 file changed
crates/common/src/config/mux.rs
@@ -431,12 +431,17 @@ async fn fetch_ssv_pubkeys(
431
page += 1;
432
433
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
- );
+ // 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,
440
+ "expected {} keys, got {}",
441
+ response.pagination.total,
442
+ pubkeys.len()
443
+ );
444
+ }
445
break;
446
}
447
0 commit comments