Skip to content

[Bug]: Swap direction lost when tracker resolves before terminal event#440

Open
glorysr1209-png wants to merge 1 commit into
entrius:testfrom
glorysr1209-png:fix/swap-direction-cache
Open

[Bug]: Swap direction lost when tracker resolves before terminal event#440
glorysr1209-png wants to merge 1 commit into
entrius:testfrom
glorysr1209-png:fix/swap-direction-cache

Conversation

@glorysr1209-png
Copy link
Copy Markdown

Summary

Closes #439.

Cache swap (from_chain, to_chain) in SwapTracker.resolved_directions on resolve() and read it from ContractEventWatcher.

Changes

  • allways/validator/swap_tracker.py: populate resolved_directions when dropping active swaps.
  • allways/validator/event_watcher.py: use cached direction fallback.
  • tests/test_swap_tracker.py: regression test.

Test plan

  • pytest tests/test_swap_tracker.py -q

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Swap direction lost when tracker resolves before terminal event

1 participant