Skip to content

relay: publish NIP-66 zap totals that refresh without a write - #258

Merged
naliyi merged 2 commits into
mainfrom
fix/relay-stats-zap-totals
Nov 10, 2026
Merged

naliyi merged 2 commits into
mainfrom
fix/relay-stats-zap-totals

Conversation

@naliyi

@naliyi naliyi commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Closes #257

Summary

  • The relay's own kind 30166 now picks up zap totals that change after a background cache refresh, instead of keeping stale totals until some unrelated event arrives.
  • Fixes the CI flake TestRelayStatsEvent/live, with every feature.

Test plan

  • New unit test: totals that change with no store write are published; it fails with the old change check
  • go test -race ./cli/relay/
  • climatrix TestRelayStatsEvent x3

wingha added 2 commits November 10, 2026 22:02
The zap ranking cache refreshes in the background, so its totals can change
with no new commit; the stats publisher now also rebuilds when they differ
from the last ones it published.
@naliyi
naliyi marked this pull request as ready for review November 10, 2026 22:19
@naliyi
naliyi merged commit 2dcf370 into main Nov 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

relay: NIP-66 stats keep stale zap totals until another write

1 participant