0
0
mirror of https://github.com/monero-project/monero synced 2025-10-06 00:32:44 +02:00

functional_tests: fix piecemeal export in cold_signing

The `while` loop condition was incorrect, which could lead to incomplete imports.
Also, setting `start` to an *undone* output speeds up the test by 16s on my machine.
This commit is contained in:
jeffro256
2025-08-22 13:20:40 -05:00
parent a9b8a8a4b1
commit 22433f8414

View File

@@ -102,10 +102,8 @@ class ColdSigningTest():
res = self.hot_wallet.incoming_transfers()
num_outputs = len(res.transfers)
done = [False] * num_outputs
while len([x for x in done if not done[x]]) > 0:
start = int(random.random() * num_outputs)
if start == num_outputs:
num_outputs -= 1
while len([x for x in done if not x]) > 0:
start = random.choice([i for i in range(len(done)) if not done[i]]) # start at a random undone output
count = 1 + int(random.random() * 5)
res = self.hot_wallet.export_outputs(all = True, start = start, count = count)