We should see our sendpsbt in wallet, and that it gets confirmed
(node_factory, bitcoind, restart)
| 2539 | @pytest.mark.parametrize("restart", [False, True]) |
| 2540 | @unittest.skipIf(TEST_NETWORK != 'regtest', "elementsd doesn't support psbt features we need") |
| 2541 | def test_sendpsbt_confirm(node_factory, bitcoind, restart): |
| 2542 | """We should see our sendpsbt in wallet, and that it gets confirmed""" |
| 2543 | l1, l2 = node_factory.get_nodes(2) |
| 2544 | l1.fundwallet(100000) |
| 2545 | |
| 2546 | psbt = l1.rpc.fundpsbt(satoshi=10000, |
| 2547 | feerate=7500, |
| 2548 | startweight=42)['psbt'] |
| 2549 | psbt = l2.rpc.addpsbtoutput(10000, psbt)['psbt'] |
| 2550 | psbt = l1.rpc.signpsbt(psbt)['signed_psbt'] |
| 2551 | sent = l1.rpc.sendpsbt(psbt) |
| 2552 | |
| 2553 | # Unconfirmed |
| 2554 | lt = only_one([t for t in l1.rpc.listtransactions()['transactions'] if t['rawtx'] == sent['tx']]) |
| 2555 | assert lt['blockheight'] == 0 |
| 2556 | |
| 2557 | if restart: |
| 2558 | l1.restart() |
| 2559 | |
| 2560 | bitcoind.generate_block(1, wait_for_mempool=sent['txid']) |
| 2561 | sync_blockheight(bitcoind, [l1]) |
| 2562 | |
| 2563 | # Should be confirmed now! |
| 2564 | lt = only_one([t for t in l1.rpc.listtransactions()['transactions'] if t['rawtx'] == sent['tx']]) |
| 2565 | assert lt['blockheight'] == bitcoind.rpc.getblockcount() |
| 2566 | |
| 2567 | |
| 2568 | def test_old_htlcs_cleanup(node_factory, bitcoind): |
nothing calls this directly
no test coverage detected