You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Check shielded-operation admission before a tree rebuild cancels sync #6452
TL;DR: When a wallet app asks for a shielded-tree rebuild while another shielded operation is running, the rebuild is refused, but a manual sync pass it already stopped ends with an empty result and no completion event.
User story
As a wallet app developer, I want a refused rebuild to leave a running manual sync untouched, to avoid showing users a sync that silently did nothing.
Scenario
Base flow
The app starts a manual shielded sync, and while it runs the user starts a shielded operation and then asks for a tree rebuild.
Actual behavior
The rebuild first stops the sync pass in flight, then tries to take exclusive operation admission. Admission is refused with ShieldedOperationInProgress; nothing is reset and background sync restarts, but the cancelled manual pass returns an empty summary with no completion event. No funds or tree state are affected, and the next pass rescans.
Expected behavior
A rebuild that cannot be admitted is refused before it stops any sync pass.
Detailed discussion
Proposed approach: take a rebuild admission before quiescing sync and hand it to the coordinator's reset, so the check cannot race a new operation, while an admitted rebuild still drains sync before touching the tree. Trade-off to settle: holding admission during the drain makes new operations wait behind it, and a sync completion handler that waits for a shielded operation would stall the drain until its budget runs out.
Activity