(node_factory)
| 571 | @unittest.skipIf(TEST_NETWORK != 'regtest', 'elementsd doesnt yet support PSBT features we need') |
| 572 | @pytest.mark.openchannel('v2') |
| 573 | def test_disconnect_fundee_v2(node_factory): |
| 574 | # Now error on fundee side during channel open, with them funding |
| 575 | disconnects = ['-WIRE_ACCEPT_CHANNEL2', |
| 576 | '+WIRE_ACCEPT_CHANNEL2', |
| 577 | '-WIRE_TX_ADD_INPUT', |
| 578 | '+WIRE_TX_ADD_INPUT', |
| 579 | '-WIRE_TX_ADD_OUTPUT', |
| 580 | '+WIRE_TX_ADD_OUTPUT', |
| 581 | '-WIRE_TX_COMPLETE'] |
| 582 | |
| 583 | l1 = node_factory.get_node() |
| 584 | l2 = node_factory.get_node(disconnect=disconnects, |
| 585 | options={'funder-policy': 'match', |
| 586 | 'funder-policy-mod': 100, |
| 587 | 'funder-fuzz-percent': 0, |
| 588 | 'funder-lease-requests-only': False}) |
| 589 | |
| 590 | l1.fundwallet(2000000) |
| 591 | l2.fundwallet(2000000) |
| 592 | |
| 593 | for d in disconnects: |
| 594 | l1.rpc.connect(l2.info['id'], 'localhost', l2.port) |
| 595 | with pytest.raises(RpcError): |
| 596 | l1.rpc.fundchannel(l2.info['id'], CHANNEL_SIZE) |
| 597 | assert l1.rpc.getpeer(l2.info['id']) is None |
| 598 | |
| 599 | # This one will succeed. |
| 600 | l1.rpc.connect(l2.info['id'], 'localhost', l2.port) |
| 601 | l1.rpc.fundchannel(l2.info['id'], CHANNEL_SIZE) |
| 602 | |
| 603 | # Should still only have one peer! |
| 604 | assert len(l1.rpc.listpeers()['peers']) == 1 |
| 605 | assert len(l2.rpc.listpeers()['peers']) == 1 |
| 606 | |
| 607 | |
| 608 | @pytest.mark.openchannel('v1') |
nothing calls this directly
no test coverage detected