MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / find_output

Function find_output

test/functional/test_framework/util.py:413–422  ·  view source on GitHub ↗

Return index to output of txid with value amount Raises exception if there is none.

(node, txid, amount)

Source from the content-addressed store, hash-verified

411#############################
412
413def find_output(node, txid, amount):
414 """
415 Return index to output of txid with value amount
416 Raises exception if there is none.
417 """
418 txdata = node.getrawtransaction(txid, 1)
419 for i in range(len(txdata["vout"])):
420 if txdata["vout"][i]["value"] == amount:
421 return i
422 raise RuntimeError("find_output txid %s : %s not found" % (txid, str(amount)))
423
424def gather_inputs(from_node, amount_needed, confirmations_required=1):
425 """

Callers 2

run_testMethod · 0.90
run_testMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected