Skip to content

fix(payment): tolerate mempool snapshot races - #32

Merged
Alike001 merged 1 commit into
mainfrom
fix/mempool-snapshot-race
Aug 30, 2026
Merged

Alike001 merged 1 commit into
mainfrom
fix/mempool-snapshot-race

Conversation

@Alike001

Copy link
Copy Markdown
Owner

Summary

  • tolerate transactions leaving a verbose mempool snapshot before their decoded-transaction lookup
  • record the failed lookup as RPC error evidence and continue checking remaining candidates
  • keep normal pre-expiry polling live when a snapshot changes
  • after invoice expiry, return unavailable for an incomplete scan so the client retries instead of persisting a false expired state

Verification

  • npm run format:check
  • npm run lint
  • npm run typecheck
  • npx vitest run src/lib/payments/payment-verifier.test.ts --maxWorkers=1 --reporter=verbose — 16 passed
  • npm run secret:check
  • npm run build

Production evidence

The production endpoint showed successful getrawmempool evidence followed by multiple successful decoded-transaction calls and one final decoded-transaction RPC error. This is the expected snapshot race covered by the new regression tests.

Closes #31

Copilot AI lite review requested due to automatic review settings August 30, 2026 11:20
@vercel

vercel Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
zecceipt Ready Ready Preview Aug 30, 2026 11:20am

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Alike001
Alike001 merged commit b6f3d79 into main Aug 30, 2026
4 checks passed
@Alike001
Alike001 deleted the fix/mempool-snapshot-race branch August 30, 2026 11:34

This branch was successfully deployed

1 active deployment
Preview — 22122416 Deployed Aug 30, 2026 by vercel[bot]
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.

Handle mempool snapshot races without pausing verification

2 participants