Skip to content

Strengthen halt lockdown to block collateral deposits and activations#8

Merged
anderdc merged 1 commit intotestfrom
feat/halt-lockdown
Apr 2, 2026
Merged

Strengthen halt lockdown to block collateral deposits and activations#8
anderdc merged 1 commit intotestfrom
feat/halt-lockdown

Conversation

@LandynDev
Copy link
Copy Markdown
Collaborator

Strengthen halt (emergency stop) lockdown

Summary

  • Add ensure_not_halted() helper following the existing ensure_owner()/ensure_validator() pattern. Refactored vote_reserve() to use this.
  • Block post_collateral(), vote_activate() when halted

Design

The halt gates at the earliest commitment points only. Everything downstream of an existing reservation is allowed to resolve naturally:

Test plan

  • Contract builds successfully (cargo contract build)
  • Verify post_collateral returns SystemHalted when halted
  • Verify vote_activate returns SystemHalted when halted
  • Verify withdraw_collateral still works when halted
  • Verify in-flight swap lifecycle completes normally when halted
  • E2E: ./tests/run.sh --chains btc --suite 02

…ation

The halt flag previously only blocked vote_reserve. Now it also blocks
post_collateral and vote_activate, while all swap resolution paths
(fulfill, confirm, timeout, extend, claim) remain allowed so in-flight
swaps can safely unwind and users can always withdraw.
@anderdc anderdc merged commit d9e10b3 into test Apr 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants