(node_factory, bitcoind)
| 443 | @pytest.mark.openchannel('v2') |
| 444 | @unittest.skipIf(TEST_NETWORK != 'regtest', 'elementsd doesnt yet support PSBT features we need') |
| 445 | def test_splice_listnodes(node_factory, bitcoind): |
| 446 | # Here we do a splice but underfund it purposefully |
| 447 | l1, l2 = node_factory.line_graph(2, fundamount=1000000, wait_for_announce=True) |
| 448 | |
| 449 | chan_id = l1.get_channel_id(l2) |
| 450 | |
| 451 | # add extra sats to pay fee |
| 452 | funds_result = l1.rpc.fundpsbt("111722sat", 0, 0, excess_as_change=True) |
| 453 | |
| 454 | result = l1.rpc.splice_init(chan_id, 100000, funds_result['psbt']) |
| 455 | result = l1.rpc.splice_update(chan_id, result['psbt']) |
| 456 | assert(result['commitments_secured'] is False) |
| 457 | result = l1.rpc.splice_update(chan_id, result['psbt']) |
| 458 | assert(result['commitments_secured'] is True) |
| 459 | result = l1.rpc.signpsbt(result['psbt']) |
| 460 | result = l1.rpc.splice_signed(chan_id, result['signed_psbt']) |
| 461 | |
| 462 | l2.daemon.wait_for_log(r'CHANNELD_NORMAL to CHANNELD_AWAITING_SPLICE') |
| 463 | l1.daemon.wait_for_log(r'CHANNELD_NORMAL to CHANNELD_AWAITING_SPLICE') |
| 464 | |
| 465 | assert len(l1.rpc.listnodes()['nodes']) == 2 |
| 466 | assert len(l2.rpc.listnodes()['nodes']) == 2 |
| 467 | |
| 468 | bitcoind.generate_block(6, wait_for_mempool=1) |
| 469 | |
| 470 | l2.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL') |
| 471 | l1.daemon.wait_for_log(r'CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL') |
| 472 | |
| 473 | bitcoind.generate_block(7) |
| 474 | |
| 475 | wait_for(lambda: len(l1.rpc.listnodes()['nodes']) == 2) |
| 476 | wait_for(lambda: len(l2.rpc.listnodes()['nodes']) == 2) |
| 477 | |
| 478 | |
| 479 | @pytest.mark.openchannel('v1') |
nothing calls this directly
no test coverage detected