From 4b8a17af9387776770c4c2a3fa3700d596a7b895 Mon Sep 17 00:00:00 2001 From: Salvatore Ingala <6681844+bigspider@users.noreply.github.com> Date: Sun, 28 Apr 2024 23:57:02 +0200 Subject: [PATCH] Make sure that wait_for_spend produces the output instances in order or output index --- matt/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matt/manager.py b/matt/manager.py index 0a45e32..1a6a9ae 100644 --- a/matt/manager.py +++ b/matt/manager.py @@ -621,7 +621,7 @@ def wait_for_spend(self, instances: Union[ContractInstance, List[ContractInstanc raise ValueError("Unsupported contract type") instance.next = next_instances - result = list(out_contracts.values()) + result = [out_contracts[idx] for idx in sorted(out_contracts.keys())] for instance in result: self.add_instance(instance) return result