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

Function spend_one_input

test/functional/wallet_bumpfee.py:280–288  ·  view source on GitHub ↗
(node, dest_address)

Source from the content-addressed store, hash-verified

278
279
280def 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
291def submit_block_with_tx(node, tx):

Callers 9

test_small_output_failsFunction · 0.85
test_dust_to_feeFunction · 0.85
test_settxfeeFunction · 0.85
test_rebumpingFunction · 0.85
test_locked_wallet_failsFunction · 0.85

Calls

no outgoing calls

Tested by 9

test_small_output_failsFunction · 0.68
test_dust_to_feeFunction · 0.68
test_settxfeeFunction · 0.68
test_rebumpingFunction · 0.68
test_locked_wallet_failsFunction · 0.68