mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
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.
This commit is contained in:
parent
6e63e366d6
commit
01eedf3821
1 changed files with 6 additions and 2 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue