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)
| 143 | return tx |
| 144 | |
| 145 | def 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 | |
| 156 | def get_legacy_sigopcount_block(block, accurate=True): |
| 157 | count = 0 |
no test coverage detected