Skip to content

Commit d235d5b

Browse files
zaidmstrrfanquake
authored andcommitted
test: Fix list index out of range error in feature_bip68_sequence.py
Github-Pull: #32765 Rebased-From: e285e69
1 parent e44d72b commit d235d5b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/functional/feature_bip68_sequence.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,10 @@ def test_sequence_lock_confirmed_inputs(self):
148148
# between height/time locking). Small random chance of making the locks
149149
# all pass.
150150
for _ in range(400):
151+
available_utxos = len(utxos)
152+
151153
# Randomly choose up to 10 inputs
152-
num_inputs = random.randint(1, 10)
154+
num_inputs = random.randint(1, min(10, available_utxos))
153155
random.shuffle(utxos)
154156

155157
# Track whether any sequence locks used should fail

0 commit comments

Comments
 (0)