From 4909ed181c93ae6ab1d963afd0da67b95cad3997 Mon Sep 17 00:00:00 2001 From: enjoyandlove Date: Tue, 19 May 2026 08:38:35 -0400 Subject: [PATCH] fix: replace speculative resolve() with mark_voted() to prevent duplicate swap votes --- allways/validator/forward.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/allways/validator/forward.py b/allways/validator/forward.py index 0fa04e4..f245129 100644 --- a/allways/validator/forward.py +++ b/allways/validator/forward.py @@ -405,7 +405,7 @@ async def confirm_miner_fulfillments( continue if result: if voting.confirm_swap(self.contract_client, self.wallet, swap.id): - tracker.resolve(swap.id, SwapStatus.COMPLETED, current_block) + tracker.mark_voted(swap.id) bt.logging.success(f'Swap {swap.id}: verified complete, confirmed') # On vote failure, voting.confirm_swap already logs the error; # the entry stays in tracker and retries next step. @@ -517,6 +517,6 @@ def enforce_swap_timeouts(self: Validator, tracker: SwapTracker, uncertain_swaps continue if voting.timeout_swap(self.contract_client, self.wallet, swap.id): - tracker.resolve(swap.id, SwapStatus.TIMED_OUT, self.block) + tracker.mark_voted(swap.id) bt.logging.warning(f'Swap {swap.id}: timed out') # On vote failure, voting.timeout_swap already logs the error.