File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
test/functional/test_framework Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -242,13 +242,17 @@ def create_self_transfer_multi(
242
242
set by amount_per_output or automatically calculated with a fee_per_output.
243
243
"""
244
244
utxos_to_spend = utxos_to_spend or [self .get_utxo ()]
245
+ sequence = [sequence ] * len (utxos_to_spend ) if type (sequence ) is int else sequence
246
+ assert_equal (len (utxos_to_spend ), len (sequence ))
245
247
# create simple tx template (1 input, 1 output)
246
248
tx = self .create_self_transfer (
247
249
fee_rate = 0 ,
248
- utxo_to_spend = utxos_to_spend [0 ], sequence = sequence )["tx" ]
250
+ utxo_to_spend = utxos_to_spend [0 ])["tx" ]
249
251
250
252
# duplicate inputs, witnesses and outputs
251
253
tx .vin = [deepcopy (tx .vin [0 ]) for _ in range (len (utxos_to_spend ))]
254
+ for txin , seq in zip (tx .vin , sequence ):
255
+ txin .nSequence = seq
252
256
tx .wit .vtxinwit = [deepcopy (tx .wit .vtxinwit [0 ]) for _ in range (len (utxos_to_spend ))]
253
257
tx .vout = [deepcopy (tx .vout [0 ]) for _ in range (num_outputs )]
254
258
You can’t perform that action at this time.
0 commit comments