Repository navigation
fix: reconnect chronik WS on end + run sync triggers w/o prices - #1155
Conversation
…inked prices Payment triggers stopped firing even though payments were detected: - The chronik WS used autoReconnect: false and reconnected from onReconnect, but chronik-client only calls onReconnect when autoReconnect is true. After the first drop the socket stayed dead until restart, so no mempool/block messages (and no triggers) were processed. Reconnect from onEnd instead, carrying over address subscriptions, retrying the connection indefinitely with capped backoff, and ignoring stale endpoints and intentional closes. - Txs committed by the bulk sync have no prices linked yet, so getTransactionValue threw before any trigger ran or was logged. Look up the day's prices when a tx has none, only when a post trigger uses <value>, and if that fails log an error for those triggers while still running the rest. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Payment triggers stopped firing even though payments were detected:
The chronik WS used autoReconnect: false and reconnected from onReconnect, but chronik-client only calls onReconnect when autoReconnect is true. After the first drop the socket stayed dead until restart, so no mempool/block messages (and no triggers) were processed. Reconnect from onEnd instead, carrying over address subscriptions, retrying the connection indefinitely with capped backoff, and ignoring stale endpoints and intentional closes.
Txs committed by the bulk sync have no prices linked yet, so getTransactionValue threw before any trigger ran or was logged. Look up the day's prices when a tx has none, only when a post trigger uses , and if that fails log an error for those triggers while still running the rest.
Summary by CodeRabbit
<value>can now use fetched price data when linked prices are unavailable.