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

Function create_raw_transaction

test/functional/test_framework/blocktools.py:145–154  ·  view source on GitHub ↗

Return raw signed transaction spending the first output of the input txid. Note that the node must be able to sign for the output that is being spent, and the node must not be running multiple wallets.

(node, txid, to_address, *, amount)

Source from the content-addressed store, hash-verified

143 return tx
144
145def create_raw_transaction(node, txid, to_address, *, amount):
146 """ Return raw signed transaction spending the first output of the
147 input txid. Note that the node must be able to sign for the
148 output that is being spent, and the node must not be running
149 multiple wallets.
150 """
151 rawtx = node.createrawtransaction(inputs=[{"txid": txid, "vout": 0}], outputs={to_address: amount})
152 signresult = node.signrawtransactionwithwallet(rawtx)
153 assert_equal(signresult["complete"], True)
154 return signresult['hex']
155
156def get_legacy_sigopcount_block(block, accurate=True):
157 count = 0

Callers 4

run_testMethod · 0.90
run_testMethod · 0.90
run_testMethod · 0.90
create_transactionFunction · 0.85

Calls 1

assert_equalFunction · 0.85

Tested by

no test coverage detected