diff options
| author | Adam Soltys <[email protected]> | 2026-06-24 23:23:50 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-06-24 23:23:50 -0700 |
| commit | 7af3c430d49d7817e9a0cf28ab49143edba4c00f (patch) | |
| tree | 33843b3dde033b0506db84d689906967ca9812b2 /src/api.js | |
| parent | 4d1a9aea0f6b234dfe8eb36d398002ccea6a5680 (diff) | |
| download | coinosv3-7af3c430d49d7817e9a0cf28ab49143edba4c00f.tar.gz coinosv3-7af3c430d49d7817e9a0cf28ab49143edba4c00f.zip | |
Make pending receives fast: cut REST load, surface live/polling state
Incoming deposits show instantly when the mempool.space WebSocket is healthy
(_ingestWs updates immediately). The lag came from the socket being starved:
a 20s frontier poll plus a full wallet re-scan every 120s generated enough
REST volume to trip mempool's per-IP rate limit (the 429/CORS errors), which
in turn degraded the socket — a feedback loop.
- While the socket is live, skip the periodic full scan entirely (the WS pushes
confirmations and block events) and poll the frontier only every ~25s as a
half-open-socket safety net — near-zero recurring REST.
- While the socket is down, poll the frontier every ~6s (was 20s) so receives
still show quickly, and keep the 120s reconcile scan.
- Refresh the frontier on WS (re)connect to catch deposits that landed while
disconnected.
- Surface a Live/Polling badge on the balance card so a stuck socket is visible.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Diffstat (limited to 'src/api.js')
0 files changed, 0 insertions, 0 deletions
