Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests: add ability to simulate tx confirmation #451

Open
ok300 opened this issue Aug 16, 2024 · 1 comment
Open

Unit tests: add ability to simulate tx confirmation #451

ok300 opened this issue Aug 16, 2024 · 1 comment

Comments

@ok300
Copy link
Contributor

ok300 commented Aug 16, 2024

For tests, we now have the trigger_swap_update! macro, which simulates Boltz WS updates. The tests then check if our swap states were correctly updated.

Since some state transitions depend on onchain tx confirmations, we need a similar method to simulate a tx confirmation, perhaps by simulating or mocking sync_payments_with_chain_data.

An example of such state transition is when Chain Swaps move from Pending to Complete when the claim tx is confirmed.

@dangeross
Copy link
Collaborator

May or may not be related, I have an update in the Webhook PR that allows history to be injected into the mock chain services for simulating txs to be retreived by get_script_history(_with_retry). In this PR it's for mocking the user lockup tx

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

No branches or pull requests

2 participants