Skip to content

Skip daily mncount writes until Core is synced#28

Merged
sidhujag merged 1 commit intomainfrom
fix/mncount-sync-guard
May 4, 2026
Merged

Skip daily mncount writes until Core is synced#28
sidhujag merged 1 commit intomainfrom
fix/mncount-sync-guard

Conversation

@sidhujag
Copy link
Copy Markdown
Member

@sidhujag sidhujag commented May 4, 2026

Summary

  • Guard daily /mncount writes behind getblockchaininfo.initialblockdownload === false.
  • Require mnSync('status') to report both blockchain and masternode sync complete before sampling masternode_count.
  • Keep retry behavior inside the same UTC day so the logger records once sync becomes healthy instead of persisting partial counts.

Production data correction

Corrected the bad 2026-05-04 production row from 2289 to the live total 2239; /mncount now returns 2239 for today.

Test plan

  • npm test -- --runInBand services/mnCountLogger.test.js
  • npm test -- --runInBand

Made with Cursor

Guard the daily masternode-count logger with Core IBD and masternode sync checks so startup catch-up cannot persist partial counts while syscoind is still syncing.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sidhujag
Copy link
Copy Markdown
Member Author

sidhujag commented May 4, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sidhujag sidhujag merged commit 2935000 into main May 4, 2026
8 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.

1 participant