mirror of
https://gitlab.com/pezkuwichain/pezkuwi-sdk.git
synced 2026-10-20 18:56:23 +00:00
Same silent-loss pattern as the previous connect-failure fix, found while auditing further: amount > max_single_tx (both deposit and withdrawal) warned and Telegram-alerted but never called db.add_deposit/add_withdrawal - "not auto-recorded" was literally in the log line. Now always recorded (pending_multisig_approval_amount_exceeds_cap), same as every other manual-review path. Backfill throttle: catching up many blocks after real downtime fires a tight burst of RPC calls that can trip a metered/shared endpoint's rate limit hard enough to poison the whole connection - observed live. A 150ms pause between backfilled blocks avoids it. Telegram notification threshold: at real user volume, a message for every small successful auto-pay would bury the ones that need a human (failures, over-cap, reserve problems, anything falling to manual 3-of-5) under noise. Added notify_threshold (default 500 USDT) gating ONLY the routine "auto-paid successfully" message on both legs - everything else keeps notifying unconditionally regardless of amount. Also found and fixed a real asymmetry: the withdrawal leg's "awaiting multisig approval" case never notified Telegram at all (the deposit leg always did) - a withdrawal needing manual review must always page someone.