diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-06-05 19:01:00 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-06-08 00:21:37 +0200 |
commit | 01eedf3821f2c3ee6bab8733f8549531c844add7 (patch) | |
tree | 359b31081f3260113a33740ace336a623793eca4 /test/functional | |
parent | 6e63e366d609312ab984b4439de2d59bb618620b (diff) |
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.
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/test_framework/util.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py index 4b5d14ebf9..f354ae0075 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -481,9 +481,13 @@ def create_confirmed_utxos(fee, node, count): return utxos -# Build a transaction that spends parent_txid:vout -# Return amount sent def chain_transaction(node, parent_txids, vouts, value, fee, num_outputs): + """Build and send a transaction that spends the given inputs (specified + by lists of parent_txid:vout each), with the desired total value and fee, + equally divided up to the desired number of outputs. + + Returns a tuple with the txid and the amount sent per output. + """ send_value = satoshi_round((value - fee)/num_outputs) inputs = [] for (txid, vout) in zip(parent_txids, vouts): |