(node_factory)
| 490 | @pytest.mark.openchannel('v1') |
| 491 | @pytest.mark.openchannel('v2') |
| 492 | def test_disconnect_fundee(node_factory): |
| 493 | # Now error on fundee side during channel open. |
| 494 | disconnects = ['-WIRE_ACCEPT_CHANNEL', |
| 495 | '+WIRE_ACCEPT_CHANNEL'] |
| 496 | if EXPERIMENTAL_DUAL_FUND: |
| 497 | disconnects = ['-WIRE_ACCEPT_CHANNEL2', |
| 498 | '+WIRE_ACCEPT_CHANNEL2', |
| 499 | '-WIRE_TX_COMPLETE', |
| 500 | '+WIRE_TX_COMPLETE'] |
| 501 | |
| 502 | l1 = node_factory.get_node() |
| 503 | l2 = node_factory.get_node(disconnect=disconnects) |
| 504 | |
| 505 | l1.fundwallet(2000000) |
| 506 | |
| 507 | for d in disconnects: |
| 508 | l1.rpc.connect(l2.info['id'], 'localhost', l2.port) |
| 509 | with pytest.raises(RpcError): |
| 510 | l1.rpc.fundchannel(l2.info['id'], 25000) |
| 511 | # First peer valishes, but later it just disconnects |
| 512 | wait_for(lambda: all([p['connected'] is False for p in l1.rpc.listpeers()['peers']])) |
| 513 | |
| 514 | # This one will succeed. |
| 515 | l1.rpc.connect(l2.info['id'], 'localhost', l2.port) |
| 516 | l1.rpc.fundchannel(l2.info['id'], 25000) |
| 517 | |
| 518 | # Should still only have one peer! |
| 519 | assert len(l1.rpc.listpeers()) == 1 |
| 520 | assert len(l2.rpc.listpeers()) == 1 |
| 521 | |
| 522 | |
| 523 | @unittest.skipIf(TEST_NETWORK != 'regtest', 'elementsd doesnt yet support PSBT features we need') |
nothing calls this directly
no test coverage detected