Skip to content

Clear release requests when a bitcoin lock burns#422

Open
blakebyrnes wants to merge 1 commit intomainfrom
pr/clear-release-request-on-burn
Open

Clear release requests when a bitcoin lock burns#422
blakebyrnes wants to merge 1 commit intomainfrom
pr/clear-release-request-on-burn

Conversation

@blakebyrnes
Copy link
Contributor

What changed

  • clear the pending release request when a bitcoin lock burns so the pending cosign state is removed too
  • cover the spent and expiration paths in the existing bitcoin lock tests

Testing

  • cargo test -p pallet-bitcoin-locks --lib

Copilot AI review requested due to automatic review settings March 9, 2026 17:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR ensures that when a Bitcoin lock is burned (due to expiration or being spent), any pending release request is cleared so associated “pending cosign” tracking is also removed, and it extends existing tests to cover these burn paths.

Changes:

  • Clear LockReleaseRequestsByUtxoId (and related cosign tracking) during burn_bitcoin_lock.
  • Extend expiration and “spent” tests to create a pending release request and assert the pending cosign state is removed when the lock burns.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
pallets/bitcoin_locks/src/lib.rs Clears pending release requests during lock burn via take_release_request.
pallets/bitcoin_locks/src/tests.rs Adds coverage for expiration/spent burn paths with a pending release request and checks storage cleanup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 9, 2026 18:29
When a bitcoin lock burns with a pending release request, clear the request and burn the held release funds.

Cover the spent path in the existing bitcoin lock tests.
@blakebyrnes blakebyrnes force-pushed the pr/clear-release-request-on-burn branch from 8afeaf5 to 6ae276e Compare March 9, 2026 18:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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