MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_txprepare_multi

Function test_txprepare_multi

tests/test_wallet.py:310–322  ·  view source on GitHub ↗
(node_factory, bitcoind)

Source from the content-addressed store, hash-verified

308
309
310def test_txprepare_multi(node_factory, bitcoind):
311 amount = 10000000
312 l1 = node_factory.get_node(random_hsm=True)
313
314 bitcoind.rpc.sendtoaddress(l1.rpc.newaddr('all')[good_addrtype()], amount / 10**8)
315 bitcoind.generate_block(1)
316 wait_for(lambda: len(l1.rpc.listfunds()['outputs']) == 1)
317
318 outputs = []
319 for i in range(9):
320 outputs.append({l1.rpc.newaddr('bech32')['bech32']: Millisatoshi(amount * 100)})
321 prep = l1.rpc.txprepare(outputs=outputs)
322 l1.rpc.txdiscard(prep['txid'])
323
324
325def feerate_from_psbt(chainparams, bitcoind, node, psbt):

Callers

nothing calls this directly

Calls 9

wait_forFunction · 0.90
MillisatoshiClass · 0.90
good_addrtypeFunction · 0.85
generate_blockMethod · 0.80
txprepareMethod · 0.80
txdiscardMethod · 0.80
get_nodeMethod · 0.45
newaddrMethod · 0.45
listfundsMethod · 0.45

Tested by

no test coverage detected