(node, dest_address)
| 278 | |
| 279 | |
| 280 | def spend_one_input(node, dest_address): |
| 281 | tx_input = dict( |
| 282 | sequence=BIP125_SEQUENCE_NUMBER, **next(u for u in node.listunspent() if u["amount"] == Decimal("0.00100000"))) |
| 283 | rawtx = node.createrawtransaction( |
| 284 | [tx_input], {dest_address: Decimal("0.00050000"), |
| 285 | node.getrawchangeaddress(): Decimal("0.00049000")}) |
| 286 | signedtx = node.signrawtransactionwithwallet(rawtx) |
| 287 | txid = node.sendrawtransaction(signedtx["hex"]) |
| 288 | return txid |
| 289 | |
| 290 | |
| 291 | def submit_block_with_tx(node, tx): |
no outgoing calls