mirror of
https://github.com/pezkuwichain/pezkuwi-subquery.git
synced 2026-07-22 18:05:40 +00:00
17c23670ea
The staking-score pallet's audit-fix (commit 9afd99ae) added a dispute-window model: receive_staking_details() only writes to PendingStakingDetails, and a separate, permissionless finalize_staking_details() call promotes it to CachedStakingDetails once DisputeWindow blocks have passed. No caller of that promotion step existed anywhere in this bot (or anywhere else in this repo) - confirmed live: Serok's and QaziM's real stake was correctly submitted to Pending after the earlier NotRegisteredNoter/nonce fixes, but sat there indefinitely with no path to ever reaching CachedStakingDetails/TrustScores. Adds finalizeMaturedPending(), called once per periodic scan cycle (and once at startup): scans PendingStakingDetails.entries(), finalizes whichever have matured, batched into one utility.batchAll like the existing submission path, routed through the same submitQueue so it can never race with a concurrent submitStakingDetails call.