mirror of
https://gitlab.com/pezkuwichain/pezkuwi-sdk.git
synced 2026-10-20 18:56:23 +00:00
A real 1 USDT deposit landed on-chain at block #18250967 and was never detected: subscribe_finalized()'s stream silently stopped yielding new blocks after startup - no error, no closed stream, the process stayed up and "Listening for deposits..." was the last line logged for 3+ hours while the deposit sat undetected the whole time. Checkpoint + backfill (added earlier) only covers a gap across a process restart; it does nothing for a stall with no restart at all, which is exactly what happened here. Both listen_deposits and listen_withdrawals now wrap their subscribe loop in an outer reconnect loop: each blocks.next() call is bounded by a 120s timeout (Asset Hub blocks land every ~6-12s, so this is a wide margin), and a timeout, a closed stream, or a stream-yielded error all trigger a full reconnect (fresh client + fresh legacy RPC) rather than silently hanging or crashing the whole process. The existing checkpoint-vs-head backfill then catches up whatever was missed during the stall, same as it already does for an ordinary restart.