[Bug]: Swap direction lost when tracker resolves before terminal contract event
Description
SwapTracker.resolve() drops swaps from active when voting completes, but ContractEventWatcher later needs (from_chain, to_chain) when SwapCompleted / SwapTimedOut fires. Without a cache, direction lookup returns empty strings and outcome scoring mis-labels the swap.
Steps to reproduce
- Validator votes on a swap and
resolve() runs before the terminal SwapCompleted event is replayed.
- Observe outcome insertion using
_lookup_swap_direction.
Expected behavior
Direction remains available until the terminal event is processed.
Actual behavior
Empty direction in stored swap outcomes.
Impact
Incorrect credibility / scoring attribution for resolved swaps.
[Bug]: Swap direction lost when tracker resolves before terminal contract event
Description
SwapTracker.resolve()drops swaps fromactivewhen voting completes, butContractEventWatcherlater needs(from_chain, to_chain)whenSwapCompleted/SwapTimedOutfires. Without a cache, direction lookup returns empty strings and outcome scoring mis-labels the swap.Steps to reproduce
resolve()runs before the terminalSwapCompletedevent is replayed._lookup_swap_direction.Expected behavior
Direction remains available until the terminal event is processed.
Actual behavior
Empty direction in stored swap outcomes.
Impact
Incorrect credibility / scoring attribution for resolved swaps.