Skip to content

Commit 01eedf3

Browse files
committed
test: doc: improve doc for chain_transaction() helper
Change to docstring format and describe the functions purpose, its parameters and return value in more detail.
1 parent 6e63e36 commit 01eedf3

File tree

1 file changed

+6
-2
lines changed
  • test/functional/test_framework

1 file changed

+6
-2
lines changed

test/functional/test_framework/util.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,13 @@ def create_confirmed_utxos(fee, node, count):
481481
return utxos
482482

483483

484-
# Build a transaction that spends parent_txid:vout
485-
# Return amount sent
486484
def chain_transaction(node, parent_txids, vouts, value, fee, num_outputs):
485+
"""Build and send a transaction that spends the given inputs (specified
486+
by lists of parent_txid:vout each), with the desired total value and fee,
487+
equally divided up to the desired number of outputs.
488+
489+
Returns a tuple with the txid and the amount sent per output.
490+
"""
487491
send_value = satoshi_round((value - fee)/num_outputs)
488492
inputs = []
489493
for (txid, vout) in zip(parent_txids, vouts):

0 commit comments

Comments
 (0)