Skip to content

Commit e285e69

Browse files
committed
test: Fix list index out of range error in feature_bip68_sequence.py
1 parent 1be688f commit e285e69

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
@@ -144,8 +144,10 @@ def test_sequence_lock_confirmed_inputs(self):
144144
# between height/time locking). Small random chance of making the locks
145145
# all pass.
146146
for _ in range(400):
147+
available_utxos = len(utxos)
148+
147149
# Randomly choose up to 10 inputs
148-
num_inputs = random.randint(1, 10)
150+
num_inputs = random.randint(1, min(10, available_utxos))
149151
random.shuffle(utxos)
150152

151153
# Track whether any sequence locks used should fail

0 commit comments

Comments
 (0)