Skip to content

fix(lnd): wait for chain/graph sync before marking LND ready#893

Draft
PatMulligan wants to merge 1 commit intoshocknet:masterfrom
PatMulligan:fix/lnd-warmup-sync
Draft

fix(lnd): wait for chain/graph sync before marking LND ready#893
PatMulligan wants to merge 1 commit intoshocknet:masterfrom
PatMulligan:fix/lnd-warmup-sync

Conversation

@PatMulligan
Copy link

Summary

Warmup() only waited for LND to respond to GetInfo(), but did not check syncedToChain/syncedToGraph. This caused LP to accept requests while LND was still syncing, resulting in "not synced" errors on every Health() check until LND caught up. A restart
would "fix" it only because LND had finished syncing by then.

Now waits for full sync before setting ready = true, with a 10-minute timeout (up from 1 minute).

Test plan

  • Stop LND, start LP — should wait and log "LND responding but not synced yet"
  • Once LND syncs, LP marks ready and serves requests normally
  • If LND doesn't sync within 10 minutes, LP rejects with clear error

Warmup() previously only checked that LND responded to GetInfo(), but
did not verify syncedToChain/syncedToGraph. This caused LP to accept
requests while LND was still syncing, leading to "not synced" errors
on every Health() check. Now waits for full sync with a 10min timeout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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