You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The string 'singleton' is used as the IndexerState row's primary key from at least four places — if anyone ever changes it, they have to find them all:
Join the discussion on Telegram
Why this matters
The string
'singleton'is used as the IndexerState row's primary key from at least four places — if anyone ever changes it, they have to find them all:backend/src/workers/soroban-event-worker.ts:8—const INDEXER_STATE_ID = 'singleton';backend/src/services/indexerService.ts:5—const INDEXER_STATE_ID = 'singleton';backend/src/routes/health.routes.ts:65—prisma.indexerState.findUnique({ where: { id: 'singleton' } })(inline)backend/src/routes/v1/admin.routes.ts:59—prisma.indexerState.findUnique({ where: { id: 'singleton' } })(inline)backend/src/routes/adminRoutes.ts:106— same inline (this file is also a duplicate addressed in [Backend] Reconcile duplicate admin metrics endpoints with divergent auth #542)Acceptance criteria
backend/src/lib/indexer-state.tsor extendindexerService.tsto export it)Files to touch
backend/src/workers/soroban-event-worker.tsbackend/src/services/indexerService.tsbackend/src/routes/health.routes.ts(line 65)backend/src/routes/v1/admin.routes.ts(line 59)backend/src/routes/adminRoutes.ts(line 106) — if not removed by [Backend] Reconcile duplicate admin metrics endpoints with divergent auth #542 firstOut of scope